Closed
Description
Code
code from glacier fixed/78721.rs
#![feature(impl_trait_in_bindings)]
struct Bug {
V1: [(); {
let f: impl core::future::Future<Output = u8> = async { 1 };
1
}],
}
fn main() {}
Meta
rustc --version --verbose
:
rustc 1.50.0-nightly (f5230fbf7 2020-11-16)
binary: rustc
commit-hash: f5230fbf76bafd86ee4376a0e26e551df8d17fec
commit-date: 2020-11-16
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly
Error output
rustc fixed/78721.rs
error: expected identifier, found `1`
--> ./78721.rs:5:65
|
5 | let f: impl core::future::Future<Output = u8> = async { 1 };
| ----- ^ expected identifier
| |
| `async` blocks are only allowed in the 2018 edition
|
= help: set `edition = "2018"` in `Cargo.toml`
= note: for more on editions, read https://doc.rust-lang.org/edition-guide
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> ./78721.rs:1:12
|
1 | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
error: internal compiler error: compiler/rustc_typeck/src/check/mod.rs:489:9: can't type-check body of DefId(0:3 ~ 78721[317d]::Bug)
--> ./78721.rs:3:1
|
3 | / struct Bug {
4 | | V1: [(); {
5 | | let f: impl core::future::Future<Output = u8> = async { 1 };
6 | | 1
7 | | }],
8 | | }
| |_^
thread 'rustc' panicked at 'Box<Any>', /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/compiler/rustc_errors/src/lib.rs:904:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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 (f5230fbf7 2020-11-16) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `Bug`
#1 [type_of] computing type of `Bug::V1::{constant#0}::{opaque#0}`
end of query stack
error: aborting due to 2 previous errors; 1 warning emitted
Backtrace
thread 'rustc' panicked at 'Box<Any>', /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/compiler/rustc_errors/src/lib.rs:904:9
stack backtrace:
0: 0x7f637d062fa0 - std::backtrace_rs::backtrace::libunwind::trace::h448c56741b6011d3
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/../../backtrace/src/backtrace/libunwind.rs:100:5
1: 0x7f637d062fa0 - std::backtrace_rs::backtrace::trace_unsynchronized::h2d26397c5720fdbb
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f637d062fa0 - std::sys_common::backtrace::_print_fmt::h720a2f61f75b9f58
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7f637d062fa0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8d62bbfda6d5c836
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/sys_common/backtrace.rs:46:22
4: 0x7f637d0d236c - core::fmt::write::h1857a60b204f1b6a
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/core/src/fmt/mod.rs:1078:17
5: 0x7f637d054c02 - std::io::Write::write_fmt::h16a9fe7680ac245c
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/io/mod.rs:1521:15
6: 0x7f637d067025 - std::sys_common::backtrace::_print::h9ba51a6db618de7d
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/sys_common/backtrace.rs:49:5
7: 0x7f637d067025 - std::sys_common::backtrace::print::h5f20e41c85e91716
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/sys_common/backtrace.rs:36:9
8: 0x7f637d067025 - std::panicking::default_hook::{{closure}}::h5b7294ca19e8edab
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/panicking.rs:208:50
9: 0x7f637d066cc8 - std::panicking::default_hook::hb3948d1f74b6ff4c
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/panicking.rs:227:9
10: 0x7f637d948e38 - rustc_driver::report_ice::h7d9ce14184308134
11: 0x7f637d067926 - std::panicking::rust_panic_with_hook::h55d23fef0ad751bc
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/panicking.rs:597:17
12: 0x7f637e5c102d - std::panicking::begin_panic::{{closure}}::h8ed9a3a33c3cff07
13: 0x7f637e5c0fc6 - std::sys_common::backtrace::__rust_end_short_backtrace::h12877d695ee54607
14: 0x7f637e58b3b6 - std::panicking::begin_panic::hf80c83cb05d9e96b
15: 0x7f637e55e4a5 - rustc_errors::HandlerInner::span_bug::h6fac04d253db2775
16: 0x7f637e55e770 - rustc_errors::Handler::span_bug::h311f1a863fb84a83
17: 0x7f637e67e514 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h90c34eb7069c0e0d
18: 0x7f637e67e10b - rustc_middle::ty::context::tls::with_opt::{{closure}}::h4f5cedf51880f643
19: 0x7f637e67e0b2 - rustc_middle::ty::context::tls::with_opt::h1abd1ee9103ab829
20: 0x7f637e67e419 - rustc_middle::util::bug::opt_span_bug_fmt::h988677b387978718
21: 0x7f637e67e3d3 - rustc_middle::util::bug::span_bug_fmt::h03690d0821b8588f
22: 0x7f637e69b08a - rustc_typeck::check::typeck_with_fallback::{{closure}}::h2a0fb83340fba4ce
23: 0x7f637e69ac16 - rustc_typeck::check::typeck::h40a6a2fbf5762437
24: 0x7f637e67d07e - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck>::compute::hbad0f7f90880e308
25: 0x7f637e573a77 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h1630d8019b850f77
26: 0x7f637e4e4c11 - rustc_data_structures::stack::ensure_sufficient_stack::h65c269314faf280e
27: 0x7f637e444369 - rustc_query_system::query::plumbing::get_query_impl::hfe85414a1a5ccee1
28: 0x7f637e6a536f - rustc_typeck::collect::type_of::type_of::h42fbf74ecd2a48fc
29: 0x7f637e45eb86 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::type_of>::compute::hae9279cbf2fd8f00
30: 0x7f637e583c34 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hc6e75e9c8f7caa60
31: 0x7f637e4e49b1 - rustc_data_structures::stack::ensure_sufficient_stack::h645165e5d5ff3eff
32: 0x7f637e3db24f - rustc_query_system::query::plumbing::get_query_impl::h2e3741383e4d3139
33: 0x7f637e48fc4c - rustc_typeck::check::check::check_item_type::h8867dc9155a10775
34: 0x7f637e564222 - rustc_middle::hir::map::Map::visit_item_likes_in_module::h7168eb874fb9fd0c
35: 0x7f637e493b1d - rustc_typeck::check::check::check_mod_item_types::h9a48b787176c4c98
36: 0x7f637e56058e - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::check_mod_item_types>::compute::h5b43bca885c2b48a
37: 0x7f637e571717 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h0022a71a2a880b88
38: 0x7f637e4eabd4 - rustc_data_structures::stack::ensure_sufficient_stack::hbfdcb494e19b13d3
39: 0x7f637e4125f5 - rustc_query_system::query::plumbing::get_query_impl::h9da7036e49fcf602
40: 0x7f637e44627e - rustc_query_system::query::plumbing::ensure_query_impl::h310784e0cb080e9e
41: 0x7f637e566e74 - rustc_session::utils::<impl rustc_session::session::Session>::time::h3ca5e6132e41bfe6
42: 0x7f637e5d998f - rustc_typeck::check_crate::h603c10bbe6bfd147
43: 0x7f637db740c2 - rustc_interface::passes::analysis::h0297dc70c5f42ca2
44: 0x7f637d97eb82 - rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute::h483a2b5cb9981507
45: 0x7f637d94c2d7 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h5dab9677a1869822
46: 0x7f637d95d080 - rustc_data_structures::stack::ensure_sufficient_stack::hef1bfd0aeb694af5
47: 0x7f637d8f18a0 - rustc_query_system::query::plumbing::get_query_impl::hc8aa257a6f276f4a
48: 0x7f637d981fff - rustc_interface::passes::QueryContext::enter::hf64e301c55abd329
49: 0x7f637d95ac7e - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::ha4de22cb0dda795a
50: 0x7f637d8e6f57 - rustc_span::with_source_map::h29633e90c8bdca16
51: 0x7f637d955ca1 - scoped_tls::ScopedKey<T>::set::hb520569c8597e8d2
52: 0x7f637d95de65 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc0d91feb93491fb8
53: 0x7f637d8c9b28 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h425334629854e612
54: 0x7f637d0768ba - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9e7afb7a0a438236
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/alloc/src/boxed.rs:1307:9
55: 0x7f637d0768ba - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h70c646c4271337a1
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/alloc/src/boxed.rs:1307:9
56: 0x7f637d0768ba - std::sys::unix::thread::Thread::new::thread_start::h35d2b8d36f210d02
at /rustc/f5230fbf76bafd86ee4376a0e26e551df8d17fec/library/std/src/sys/unix/thread.rs:71:17
57: 0x7f637cf6f3e9 - start_thread
58: 0x7f637ce8c293 - __GI___clone
59: 0x0 - <unknown>
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 (f5230fbf7 2020-11-16) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `Bug`
#1 [type_of] computing type of `Bug::V1::{constant#0}::{opaque#0}`
#2 [check_mod_item_types] checking item types in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors; 1 warning emitted
Metadata
Metadata
Assignees
Labels
Category: This is a bug.`#![feature(impl_trait_in_bindings)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.Performance or correctness regression from one stable version to another.