Open matthiaskrgr opened 1 year ago
This is just a regular GAT ICE:
trait Gat {
type FooArg<'a, 'b: 'b>;
}
impl Gat for () {
type FooArg<'a, 'b: 'b> = &'a dyn ToString;
}
struct Test;
impl Iterator for Test {
type Item = Box<dyn Fn(<() as Gat>::FooArg<'_, '_>)>;
fn next(&mut self) -> Option<Self::Item> { None }
}
pub fn main() {}
Heh so that started crashing with 1.65
then :/
I think that's just when GATs were stabilized.
@rustbot label -requires-nightly
Code
Meta
rustc --version --verbose
:Error output
Backtrace
``` error: internal compiler error: /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/compiler/rustc_infer/src/infer/outlives/env.rs:148:26: add_outlives_bounds: unexpected regions: (RePlaceholder(Placeholder { universe: U3, bound: BoundRegion { var: 1, kind: BrNamed(DefId(0:18 ~ playground[4e9f]::{impl#1}::Item::'_#1), '_) } }), RePlaceholder(Placeholder { universe: U3, bound: BoundRegion { var: 1, kind: BrNamed(DefId(0:18 ~ playground[4e9f]::{impl#1}::Item::'_#1), '_) } })) thread 'rustc' panicked at 'Box', /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/compiler/rustc_errors/src/lib.rs:1651:9
stack backtrace:
0: 0x7fb0e822a071 - std::backtrace_rs::backtrace::libunwind::trace::h6aeaf83abc038fe6
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7fb0e822a071 - std::backtrace_rs::backtrace::trace_unsynchronized::h4f9875212db0ad97
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fb0e822a071 - std::sys_common::backtrace::_print_fmt::h3f820027e9c39d3b
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:65:5
3: 0x7fb0e822a071 - ::fmt::hded4932df41373b3
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7fb0e8289d9f - core::fmt::rt::Argument::fmt::hc8ead7746b2406d6
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/fmt/rt.rs:138:9
5: 0x7fb0e8289d9f - core::fmt::write::hb1cb56105a082ad9
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/fmt/mod.rs:1094:21
6: 0x7fb0e821d271 - std::io::Write::write_fmt::h797fda7085c97e57
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/io/mod.rs:1713:15
7: 0x7fb0e8229e85 - std::sys_common::backtrace::_print::h492d3c92d7400346
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7fb0e8229e85 - std::sys_common::backtrace::print::hf74aa2eef05af215
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7fb0e822cb47 - std::panicking::default_hook::{{closure}}::h8cad394227ea3de8
10: 0x7fb0e822c934 - std::panicking::default_hook::h249cc184fec99a8a
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:288:9
11: 0x7fb0eb3a9b5b - rustc_driver_impl[55b27a31f76e3fb7]::install_ice_hook::{closure#0}
12: 0x7fb0e822d28d - as core::ops::function::Fn>::call::h0be7fc2421582b49
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1999:9
13: 0x7fb0e822d28d - std::panicking::rust_panic_with_hook::h82ebcd5d5ed2fad4
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:709:13
14: 0x7fb0eb8b6dc1 - std[a2d7a4c8dd6a1366]::panicking::begin_panic::::{closure#0}
15: 0x7fb0eb8b2b96 - std[a2d7a4c8dd6a1366]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !>
16: 0x7fb0eb8aece6 - std[a2d7a4c8dd6a1366]::panicking::begin_panic::
17: 0x7fb0eb8ac204 - ::bug::
18: 0x7fb0eb8abfa6 - ::bug::
19: 0x7fb0eb93a92c - rustc_middle[69e8a450f04f22d]::util::bug::opt_span_bug_fmt::::{closure#0}
20: 0x7fb0eb936ffa - rustc_middle[69e8a450f04f22d]::ty::context::tls::with_opt::::{closure#0}, !>::{closure#0}
21: 0x7fb0eb936fca - rustc_middle[69e8a450f04f22d]::ty::context::tls::with_context_opt::::{closure#0}, !>::{closure#0}, !>
22: 0x7fb0e9a7632d - rustc_middle[69e8a450f04f22d]::util::bug::bug_fmt
23: 0x7fb0e9e096db - ::with_bounds::, alloc[af44278adca4aa3a]::vec::Vec, ::implied_bounds_tys::{closure#0}>>
24: 0x7fb0ea310490 - rustc_hir_analysis[367b7eb6b2106fd1]::check::compare_impl_item::compare_method_predicate_entailment
25: 0x7fb0ea3065b0 - rustc_hir_analysis[367b7eb6b2106fd1]::check::compare_impl_item::compare_impl_method
26: 0x7fb0ea2fa9d3 - rustc_hir_analysis[367b7eb6b2106fd1]::check::check::check_mod_item_types
27: 0x7fb0e9feac5c - rustc_query_impl[9640443f3247e199]::plumbing::__rust_begin_short_backtrace::>
28: 0x7fb0e9feac3e - >::call_once
29: 0x7fb0e9b688ef - rustc_query_system[18feb85a2a4aa83f]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[9640443f3247e199]::plumbing::QueryCtxt, false>
30: 0x7fb0ead65a14 - rustc_query_impl[9640443f3247e199]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
31: 0x7fb0ea88fdd7 - ::for_each_module::
32: 0x7fb0ea88f20d - ::time::<(), rustc_hir_analysis[367b7eb6b2106fd1]::check_crate::{closure#6}>
33: 0x7fb0ea88d247 - rustc_hir_analysis[367b7eb6b2106fd1]::check_crate
34: 0x7fb0ea88843d - rustc_interface[2ac6857faa489841]::passes::analysis
35: 0x7fb0ea8c624a - rustc_query_impl[9640443f3247e199]::plumbing::__rust_begin_short_backtrace::>
36: 0x7fb0ea8c6239 - >::call_once
37: 0x7fb0eaa7b8e8 - rustc_query_system[18feb85a2a4aa83f]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[9640443f3247e199]::plumbing::QueryCtxt, false>
38: 0x7fb0eaa7b6b9 - rustc_query_impl[9640443f3247e199]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
39: 0x7fb0ea632f22 - >::enter::, rustc_driver_impl[55b27a31f76e3fb7]::run_compiler::{closure#1}::{closure#2}::{closure#4}>
40: 0x7fb0ea631e85 - ::enter::, rustc_span[b25f563e2e6d20a1]::ErrorGuaranteed>>
41: 0x7fb0ea62f683 - std[a2d7a4c8dd6a1366]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[55b27a31f76e3fb7]::run_compiler::{closure#1}>::{closure#0}, core[3d2408b9a7974bb]::result::Result<(), rustc_span[b25f563e2e6d20a1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3d2408b9a7974bb]::result::Result<(), rustc_span[b25f563e2e6d20a1]::ErrorGuaranteed>>
42: 0x7fb0eac5b165 - <::spawn_unchecked_, rustc_driver_impl[55b27a31f76e3fb7]::run_compiler::{closure#1}>::{closure#0}, core[3d2408b9a7974bb]::result::Result<(), rustc_span[b25f563e2e6d20a1]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3d2408b9a7974bb]::result::Result<(), rustc_span[b25f563e2e6d20a1]::ErrorGuaranteed>>::{closure#1} as core[3d2408b9a7974bb]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
43: 0x7fb0e82377b5 - as core::ops::function::FnOnce>::call_once::h9adfc2ae43657457
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
44: 0x7fb0e82377b5 - as core::ops::function::FnOnce>::call_once::h14fefbfa7b574396
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/alloc/src/boxed.rs:1985:9
45: 0x7fb0e82377b5 - std::sys::unix::thread::Thread::new::thread_start::ha211bb47f6f5cedc
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/sys/unix/thread.rs:108:17
46: 0x7fb0e8107609 - start_thread
47: 0x7fb0e802a133 - clone
48: 0x0 -
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.71.0 (8ede3aae2 2023-07-12) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [check_mod_item_types] checking item types in top-level module
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0412`.
```