-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Create a new project and add this dependency: console-subscriber = "0.1.8"
Meta
The bug only happens on nightly for me.
rustc --version --verbose:
rustc 1.65.0-nightly (cf9ed0dd5 2022-09-15)
binary: rustc
commit-hash: cf9ed0dd5836201843d28bbad50abfbe1913af2a
commit-date: 2022-09-15
host: aarch64-apple-darwin
release: 1.65.0-nightly
LLVM version: 15.0.0
Error output
ice ❯ cargo check
Checking tower v0.4.13
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
error: internal compiler error: broken MIR in DefId(0:345 ~ tower[a847]::balance::pool::{impl#3}::build) (CanonicalUserTypeAnnotation { user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Ty(General(U0)) }], value: TypeOf(DefId(0:232 ~ tower[a847]::balance::p2c::service::{impl#1}::new), UserSubsts { substs: [^0, ^1], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(0:229 ~ tower[a847]::balance::p2c::service::{impl#1}), self_ty: balance::p2c::service::Balance<^2, ^3> }) }) }, span: /Users/klasseg/.cargo/registry/src/github.com-1ecc6299db9ec823/tower-0.4.13/src/balance/pool/mod.rs:293:22: 293:34 (#0), inferred_ty: fn(std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>) -> balance::p2c::service::Balance<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request> {balance::p2c::service::Balance::<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request>::new} }): bad user type AscribeUserType(fn(std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>) -> balance::p2c::service::Balance<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request> {balance::p2c::service::Balance::<std::pin::Pin<std::boxed::Box<balance::pool::PoolDiscoverer<MS, Target, Request>>>, Request>::new}, DefId(0:232 ~ tower[a847]::balance::p2c::service::{impl#1}::new) UserSubsts { substs: [_, _], user_self_ty: Some(UserSelfTy { impl_def_id: DefId(0:229 ~ tower[a847]::balance::p2c::service::{impl#1}), self_ty: balance::p2c::service::Balance<_, _> }) }, type_of=fn(D) -> balance::p2c::service::Balance<D, Req> {balance::p2c::service::Balance::<D, Req>::new}): NoSolution
|
= note: delayed at compiler/rustc_borrowck/src/type_check/mod.rs:1087:25
thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1492:13
stack backtrace:
0: 0x10340f684 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he789f67fc8a9da2e
1: 0x103459cc0 - core::fmt::write::hb75a06449ee96023
2: 0x103402624 - std::io::Write::write_fmt::ha537d648dc10faf4
3: 0x103411f00 - std::panicking::default_hook::{{closure}}::h45c334da6e00df74
4: 0x103411c24 - std::panicking::default_hook::he75f84e78540a10b
5: 0x10b288ed4 - rustc_driver[5fd5b6a976810624]::DEFAULT_HOOK::{closure#0}::{closure#0}
6: 0x1034125c4 - std::panicking::rust_panic_with_hook::hc9e333328e5dabc1
7: 0x10f1b3510 - std[f4aea6da87cbc21a]::panicking::begin_panic::<rustc_errors[974c83b77345286b]::ExplicitBug>::{closure#0}
8: 0x10f1b2c68 - std[f4aea6da87cbc21a]::sys_common::backtrace::__rust_end_short_backtrace::<std[f4aea6da87cbc21a]::panicking::begin_panic<rustc_errors[974c83b77345286b]::ExplicitBug>::{closure#0}, !>
9: 0x10f4a100c - std[f4aea6da87cbc21a]::panicking::begin_panic::<rustc_errors[974c83b77345286b]::ExplicitBug>
10: 0x10f1aaa10 - std[f4aea6da87cbc21a]::panic::panic_any::<rustc_errors[974c83b77345286b]::ExplicitBug>
11: 0x10f1ad514 - <rustc_errors[974c83b77345286b]::HandlerInner as core[8fcc4ba27723b755]::ops::drop::Drop>::drop
12: 0x10b2b4758 - core[8fcc4ba27723b755]::ptr::drop_in_place::<rustc_session[757ea4cf3b0505ee]::parse::ParseSess>
13: 0x10b2b7924 - <alloc[22030d15cd77a433]::rc::Rc<rustc_session[757ea4cf3b0505ee]::session::Session> as core[8fcc4ba27723b755]::ops::drop::Drop>::drop
14: 0x10b2a0288 - core[8fcc4ba27723b755]::ptr::drop_in_place::<rustc_interface[d91932c246e86ebf]::interface::Compiler>
15: 0x10b2a49e4 - rustc_interface[d91932c246e86ebf]::interface::create_compiler_and_run::<core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>, rustc_driver[5fd5b6a976810624]::run_compiler::{closure#1}>
16: 0x10b2f3a2c - <scoped_tls[83b560d220a84d07]::ScopedKey<rustc_span[9c8359ef8e7c8b3c]::SessionGlobals>>::set::<rustc_interface[d91932c246e86ebf]::interface::run_compiler<core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>, rustc_driver[5fd5b6a976810624]::run_compiler::{closure#1}>::{closure#0}, core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>>
17: 0x10b2bd6c4 - std[f4aea6da87cbc21a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[d91932c246e86ebf]::util::run_in_thread_pool_with_globals<rustc_interface[d91932c246e86ebf]::interface::run_compiler<core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>, rustc_driver[5fd5b6a976810624]::run_compiler::{closure#1}>::{closure#0}, core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>>::{closure#0}, core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>>
18: 0x10b2c0548 - <<std[f4aea6da87cbc21a]::thread::Builder>::spawn_unchecked_<rustc_interface[d91932c246e86ebf]::util::run_in_thread_pool_with_globals<rustc_interface[d91932c246e86ebf]::interface::run_compiler<core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>, rustc_driver[5fd5b6a976810624]::run_compiler::{closure#1}>::{closure#0}, core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>>::{closure#0}, core[8fcc4ba27723b755]::result::Result<(), rustc_errors[974c83b77345286b]::ErrorGuaranteed>>::{closure#1} as core[8fcc4ba27723b755]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
19: 0x10341a460 - std::sys::unix::thread::Thread::new::thread_start::haf69ac0ebc3abb55
20: 0x1bb81426c - __pthread_deallocate
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.65.0-nightly (cf9ed0dd5 2022-09-15) running on aarch64-apple-darwin
note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `tower`
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.