Closed
Description
Code
fn change_parameter_pattern() {
|x: x| x
}
Meta
rustc --version --verbose
:
rustc 1.50.0-nightly (e37f25aa3 2020-11-28)
binary: rustc
commit-hash: e37f25aa3f356546ab851e394d5598fc575eabda
commit-date: 2020-11-28
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly
Error output
error[E0573]: expected type, found local variable `x`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:9
|
2 | |x: x| x
| ^ not a type
thread 'rustc' panicked at 'expected `NodeId` to be lowered already for res Local(
NodeId(14),
)', compiler/rustc_ast_lowering/src/lib.rs:674:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.50.0-nightly (e37f25aa3 2020-11-28) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
error: aborting due to previous error
For more information about this error, try `rustc --explain E0573`.
Backtrace
error[E0573]: expected type, found local variable `x`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:9
|
2 | |x: x| x
| ^ not a type
thread 'rustc' panicked at 'expected `NodeId` to be lowered already for res Local(
NodeId(14),
)', compiler/rustc_ast_lowering/src/lib.rs:674:17
stack backtrace:
0: rust_begin_unwind
at /rustc/e37f25aa3f356546ab851e394d5598fc575eabda/library/std/src/panicking.rs:493:5
1: std::panicking::begin_panic_fmt
at /rustc/e37f25aa3f356546ab851e394d5598fc575eabda/library/std/src/panicking.rs:435:5
2: rustc_ast_lowering::LoweringContext::lower_res::{{closure}}::{{closure}}
3: rustc_ast_lowering::LoweringContext::lower_node_id_generic
4: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_path_segment
5: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
6: rustc_ast_lowering::path::<impl rustc_ast_lowering::LoweringContext>::lower_qpath
7: rustc_ast_lowering::LoweringContext::lower_ty_direct
8: rustc_ast_lowering::LoweringContext::lower_fn_decl
9: rustc_ast_lowering::expr::<impl rustc_ast_lowering::LoweringContext>::lower_expr_closure
10: rustc_data_structures::stack::ensure_sufficient_stack
11: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
12: <core::iter::adapters::flatten::Flatten<I> as core::iter::traits::iterator::Iterator>::next
13: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
14: rustc_arena::cold_path
15: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_block_expr_opt
16: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_fn_body_block
17: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_item
18: rustc_ast_lowering::LoweringContext::with_hir_id_owner
19: <rustc_ast_lowering::item::ItemLowerer as rustc_ast::visit::Visitor>::visit_mod
20: rustc_ast_lowering::lower_crate
21: rustc_interface::passes::BoxedResolver::access::{{closure}}
22: rustc_interface::passes::configure_and_expand::{{closure}}
23: rustc_interface::queries::Queries::lower_to_hir
24: rustc_interface::queries::Queries::global_ctxt
25: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
26: rustc_span::with_source_map
27: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.