-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
Note that in order to reproduce this, you need a rustc build with debug assertions enabled!
code from fixed/88586.rs
trait A where
for<'a> Self: 'a,
{
}
Meta
rustc --version --verbose
:
rustc 1.58.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.58.0-dev
LLVM version: 13.0.0
rustc @ 0119879
Error output
error[E0601]: `main` function not found in crate `88586`
--> ./88586.rs:1:1
|
1 | / trait A where
2 | | for<'a> Self: 'a,
3 | | {
4 | | }
| |_^ consider adding a `main` function to `./88586.rs`
error: internal compiler error: compiler/rustc_middle/src/ty/fold.rs:884:21: Not enough bound vars: BoundRegion { var: 0, kind: BrNamed(DefId(0:4 ~ 88586[6450]::A::'a), 'a) } not found in []
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1147: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.58.0-dev running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [super_predicates_that_define_assoc_type] computing the super traits of `A`
#1 [super_predicates_of] computing the super predicates of `A`
end of query stack
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0601`.
Backtrace
error[E0601]: `main` function not found in crate `88586`
--> ./88586.rs:1:1
|
1 | / trait A where
2 | | for<'a> Self: 'a,
3 | | {
4 | | }
| |_^ consider adding a `main` function to `./88586.rs`
error: internal compiler error: compiler/rustc_middle/src/ty/fold.rs:884:21: Not enough bound vars: BoundRegion { var: 0, kind: BrNamed(DefId(0:4 ~ 88586[6450]::A::'a), 'a) } not found in []
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1147:9
stack backtrace:
0: 0x7fd788e8e2ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb9742b8546a91052
1: 0x7fd788f39d8c - core::fmt::write::h3fddcb644eebfde3
2: 0x7fd788ed2fd5 - std::io::Write::write_fmt::h1a1f2abcba70e3b1
3: 0x7fd788e8e0cb - std::sys_common::backtrace::print::hc4410d3dd534974f
4: 0x7fd788edb7e0 - std::panicking::default_hook::{{closure}}::heb097f17356ef40d
5: 0x7fd788edb3ce - std::panicking::default_hook::h3a96289c47c5d257
6: 0x7fd78a1e8215 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h225178fa6d985d8b
7: 0x7fd788edbfe0 - std::panicking::rust_panic_with_hook::h47efdb331119e29d
8: 0x7fd78cec433d - std::panicking::begin_panic::{{closure}}::h0b6904671182664f
9: 0x7fd78cec2bf6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc753ff6e2dd654a7
10: 0x7fd78cec42e6 - std::panicking::begin_panic::hf4e8e4cd817ff020
11: 0x7fd78cec4286 - std::panic::panic_any::hc91236531ea21313
12: 0x7fd78ceea51a - rustc_errors::HandlerInner::bug::h07de0bdacef7f162
13: 0x7fd78cee7570 - rustc_errors::Handler::bug::h282d50e084509b79
14: 0x7fd78cd2e3a0 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h5d36691cdd5ee3a7
15: 0x7fd78cd2215b - rustc_middle::ty::context::tls::with_opt::{{closure}}::ha428d361a9d0af98
16: 0x7fd78cd2210e - rustc_middle::ty::context::tls::with_opt::h635d45a5d5cca663
17: 0x7fd78cd2e293 - rustc_middle::util::bug::opt_span_bug_fmt::hf83a75f36a2197ce
18: 0x7fd78cd2e205 - rustc_middle::util::bug::bug_fmt::h08c76cd93448a7c9
19: 0x7fd78cc05690 - <rustc_middle::ty::fold::ValidateBoundVars as rustc_middle::ty::fold::TypeVisitor>::visit_region::hb3135976605024aa
20: 0x7fd78ab8dd9a - rustc_middle::ty::sty::Binder<T>::bind_with_vars::h8792c95916b63a8f
21: 0x7fd78aa2b775 - <dyn rustc_typeck::astconv::AstConv>::add_bounds::hb6db9363dd76ceeb
22: 0x7fd78ac44ad9 - rustc_typeck::collect::predicates_from_bound::h8afc6661c16f5787
23: 0x7fd78aad00b6 - <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::next::h66a15221e366febc
24: 0x7fd78ab23ec2 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hc63691639ff03c14
25: 0x7fd78ac3bdb6 - rustc_typeck::collect::super_predicates_that_define_assoc_type::h1b9bb2afe7ee3720
26: 0x7fd78b9de47f - rustc_query_system::query::plumbing::get_query::h3eea89e126dbfce7
27: 0x7fd78be7960d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::super_predicates_that_define_assoc_type::hda91de24793658c2
28: 0x7fd78ac3b4c5 - rustc_typeck::collect::super_predicates_of::h1dceb15cd395b09a
29: 0x7fd78b8f743b - rustc_query_system::query::plumbing::try_execute_query::h9d37f06980ac4334
30: 0x7fd78ba01d63 - rustc_query_system::query::plumbing::get_query::h84c6ce347414cd25
31: 0x7fd78be795b8 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::super_predicates_of::h48734c8f342c9abd
32: 0x7fd78ac36d2e - rustc_typeck::collect::convert_item::h62188739ad4c46e0
33: 0x7fd78ac2ae8a - <rustc_typeck::collect::CollectItemTypesVisitor as rustc_hir::intravisit::Visitor>::visit_item::h14b2f2ee11c9ba74
34: 0x7fd78ac2a2e6 - rustc_typeck::collect::collect_mod_item_types::h798c096f33ec4eaf
35: 0x7fd78b8e830a - rustc_query_system::query::plumbing::try_execute_query::h7cd5c6214028bfab
36: 0x7fd78ba3759b - rustc_query_system::query::plumbing::get_query::heea213feabc08c9c
37: 0x7fd78ac5fe80 - rustc_typeck::check_crate::h33c1680f197be66c
38: 0x7fd78a34780b - rustc_interface::passes::analysis::h7c1bb0ea479fc59a
39: 0x7fd78b900a1c - rustc_query_system::query::plumbing::try_execute_query::hb23b91ca9ff6e3f2
40: 0x7fd78b9f1fec - rustc_query_system::query::plumbing::get_query::h6ff0d53ffb4fc288
41: 0x7fd78a1ab849 - rustc_interface::passes::QueryContext::enter::h132761253d28b6a1
42: 0x7fd78a09295a - std::sys_common::backtrace::__rust_begin_short_backtrace::hc801dc55c4fb9438
43: 0x7fd78a1af450 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h334b669fc5472cf7
44: 0x7fd788edf943 - std::sys::unix::thread::Thread::new::thread_start::h5b3c5f92bbe007fe
45: 0x7fd7854c9259 - start_thread
46: 0x7fd788cb75e3 - __GI___clone
47: 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.58.0-dev running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [super_predicates_that_define_assoc_type] computing the super traits of `A`
#1 [super_predicates_of] computing the super predicates of `A`
#2 [collect_mod_item_types] collecting item types in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.