Closed
Description
Code
trait A where
for<'a> Self: 'a,
{
}
Meta
Stable (1.54.0) works correctly(?) (E0311 the parameter type `Self` may not live long enough
with nonsensical help consider adding an explicit lifetime bound `Self: 'a`
).
rustc --version --verbose
:
rustc 1.56.0-nightly (50171c310 2021-09-01)
binary: rustc
commit-hash: 50171c310cd15e1b2d3723766ce64e2e4d6696fc
commit-date: 2021-09-01
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 13.0.0
Error output
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/50171c310cd15e1b2d3723766ce64e2e4d6696fc/compiler/rustc_middle/src/ty/sty.rs:971:9
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.56.0-nightly (50171c310 2021-09-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
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
Backtrace
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/50171c310cd15e1b2d3723766ce64e2e4d6696fc/compiler/rustc_middle/src/ty/sty.rs:971:9
stack backtrace:
0: rust_begin_unwind
at /rustc/50171c310cd15e1b2d3723766ce64e2e4d6696fc/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/50171c310cd15e1b2d3723766ce64e2e4d6696fc/library/core/src/panicking.rs:101:14
2: core::panicking::panic
at /rustc/50171c310cd15e1b2d3723766ce64e2e4d6696fc/library/core/src/panicking.rs:50:5
3: rustc_typeck::collect::predicates_from_bound
4: <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::next
5: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
6: rustc_typeck::collect::super_predicates_that_define_assoc_type
7: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
8: rustc_data_structures::stack::ensure_sufficient_stack
9: rustc_query_system::query::plumbing::get_query_impl
10: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::super_predicates_that_define_assoc_type
11: rustc_typeck::collect::super_predicates_of
12: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
13: rustc_query_system::query::plumbing::force_query_with_job
14: rustc_query_system::query::plumbing::get_query_impl
15: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::super_predicates_of
16: rustc_typeck::collect::convert_item
17: <rustc_typeck::collect::CollectItemTypesVisitor as rustc_hir::intravisit::Visitor>::visit_item
18: rustc_typeck::collect::collect_mod_item_types
19: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
20: rustc_data_structures::stack::ensure_sufficient_stack
21: rustc_query_system::query::plumbing::force_query_with_job
22: rustc_query_system::query::plumbing::get_query_impl
23: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_mod_item_types
24: rustc_session::session::Session::track_errors
25: rustc_typeck::check_crate
26: rustc_interface::passes::analysis
27: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
28: rustc_data_structures::stack::ensure_sufficient_stack
29: rustc_query_system::query::plumbing::force_query_with_job
30: rustc_query_system::query::plumbing::get_query_impl
31: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
32: rustc_interface::passes::QueryContext::enter
33: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
34: rustc_span::with_source_map
35: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.56.0-nightly (50171c310 2021-09-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
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
Category: This is a bug.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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.