Closed
Description
Code
Cargo.toml
[package]
name = "test_rustc_ice"
version = "0.1.0"
edition = "2021"
[dependencies]
tracing-subscriber = "0.3.9"
rust-toolchain.toml
[toolchain]
channel = "nightly"
src/main.rs
fn main() {
println!("Hello, world!");
}
Meta
rustc --version --verbose
:
rustc 1.61.0-nightly (52b34550a 2022-03-15)
binary: rustc
commit-hash: 52b34550aca5f7dd7e152f773e3ab786acb86f6f
commit-date: 2022-03-15
host: x86_64-apple-darwin
release: 1.61.0-nightly
LLVM version: 14.0.0
Error output
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/52b34550aca5f7dd7e152f773e3ab786acb86f6f/compiler/rustc_middle/src/ty/sty.rs:1089:9
Backtrace
Compiling tracing-subscriber v0.3.9
thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/52b34550aca5f7dd7e152f773e3ab786acb86f6f/compiler/rustc_middle/src/ty/sty.rs:1089:9
stack backtrace:
0: 0x10ba2ffb4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h254d4b149dd42021
1: 0x10ba8864b - core::fmt::write::h75fa52a54c4c085a
2: 0x10ba22798 - std::io::Write::write_fmt::h5beb680276d373ed
3: 0x10ba334ed - std::panicking::default_hook::{{closure}}::h44a470242caad290
4: 0x10ba331d1 - std::panicking::default_hook::heb3bf7a1a99fd831
5: 0x119d639fa - rustc_driver[68f5af5f4fbd43df]::DEFAULT_HOOK::{closure#0}::{closure#0}
6: 0x10ba33c56 - std::panicking::rust_panic_with_hook::h3835de48593d565d
7: 0x10ba33a5a - std::panicking::begin_panic_handler::{{closure}}::hf5992e479f8a449b
8: 0x10ba30437 - std::sys_common::backtrace::__rust_end_short_backtrace::hd7d94f69adb52ab6
9: 0x10ba3376a - _rust_begin_unwind
10: 0x10bab1c33 - core::panicking::panic_fmt::hc66f4ee528ad596d
11: 0x10bab1b17 - core::panicking::panic::h7973c4c5a950ee25
12: 0x11df959cc - rustc_trait_selection[718c1d978defa14d]::traits::type_known_to_meet_bound_modulo_regions
13: 0x11cb28b79 - <rustc_infer[1fa14ac0600d063c]::infer::InferCtxtBuilder>::enter::<bool, rustc_ty_utils[5b827f266eb119e4]::common_traits::is_item_raw::{closure#0}>
14: 0x11cb2f1dd - rustc_ty_utils[5b827f266eb119e4]::common_traits::is_item_raw
15: 0x11d3e81a5 - rustc_query_system[d6602a5114bfb900]::query::plumbing::try_execute_query::<rustc_query_impl[da14cdaa7c74b32b]::plumbing::QueryCtxt, rustc_query_system[d6602a5114bfb900]::query::caches::DefaultCache<rustc_middle[6028c850d8428a7e]::ty::ParamEnvAnd<rustc_middle[6028c850d8428a7e]::ty::Ty>, bool>>
16: 0x11d4cfc24 - rustc_query_system[d6602a5114bfb900]::query::plumbing::get_query::<rustc_query_impl[da14cdaa7c74b32b]::queries::is_sized_raw, rustc_query_impl[da14cdaa7c74b32b]::plumbing::QueryCtxt>
17: 0x11e2a12c6 - <rustc_middle[6028c850d8428a7e]::ty::Ty>::is_sized
18: 0x11e1dd0bf - <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached
19: 0x11e1f6536 - rustc_middle[6028c850d8428a7e]::ty::layout::layout_of
20: 0x11d503758 - rustc_query_system[d6602a5114bfb900]::query::plumbing::get_query::<rustc_query_impl[da14cdaa7c74b32b]::queries::layout_of, rustc_query_impl[da14cdaa7c74b32b]::plumbing::QueryCtxt>
21: 0x11d74d360 - <rustc_query_impl[da14cdaa7c74b32b]::Queries as rustc_middle[6028c850d8428a7e]::ty::query::QueryEngine>::layout_of
22: 0x11e225a14 - <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt> as rustc_middle[6028c850d8428a7e]::ty::layout::LayoutOf>::layout_of
23: 0x11e2162c9 - <alloc[4452997152f96314]::vec::Vec<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>> as alloc[4452997152f96314]::vec::spec_from_iter::SpecFromIter<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>, core[bf1d29f64462da08]::iter::adapters::GenericShunt<core[bf1d29f64462da08]::iter::adapters::map::Map<core[bf1d29f64462da08]::slice::iter::Iter<rustc_middle[6028c850d8428a7e]::ty::FieldDef>, <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>, core[bf1d29f64462da08]::result::Result<core[bf1d29f64462da08]::convert::Infallible, rustc_middle[6028c850d8428a7e]::ty::layout::LayoutError>>>>::from_iter
24: 0x11e2155fc - <alloc[4452997152f96314]::vec::Vec<alloc[4452997152f96314]::vec::Vec<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>>> as alloc[4452997152f96314]::vec::spec_from_iter::SpecFromIter<alloc[4452997152f96314]::vec::Vec<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>>, core[bf1d29f64462da08]::iter::adapters::GenericShunt<core[bf1d29f64462da08]::iter::adapters::map::Map<core[bf1d29f64462da08]::slice::iter::Iter<rustc_middle[6028c850d8428a7e]::ty::VariantDef>, <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>, core[bf1d29f64462da08]::result::Result<core[bf1d29f64462da08]::convert::Infallible, rustc_middle[6028c850d8428a7e]::ty::layout::LayoutError>>>>::from_iter
25: 0x11e1dc3b2 - <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached
26: 0x11e1f6536 - rustc_middle[6028c850d8428a7e]::ty::layout::layout_of
27: 0x11d503758 - rustc_query_system[d6602a5114bfb900]::query::plumbing::get_query::<rustc_query_impl[da14cdaa7c74b32b]::queries::layout_of, rustc_query_impl[da14cdaa7c74b32b]::plumbing::QueryCtxt>
28: 0x11d74d360 - <rustc_query_impl[da14cdaa7c74b32b]::Queries as rustc_middle[6028c850d8428a7e]::ty::query::QueryEngine>::layout_of
29: 0x11e225a14 - <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt> as rustc_middle[6028c850d8428a7e]::ty::layout::LayoutOf>::layout_of
30: 0x11e2162c9 - <alloc[4452997152f96314]::vec::Vec<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>> as alloc[4452997152f96314]::vec::spec_from_iter::SpecFromIter<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>, core[bf1d29f64462da08]::iter::adapters::GenericShunt<core[bf1d29f64462da08]::iter::adapters::map::Map<core[bf1d29f64462da08]::slice::iter::Iter<rustc_middle[6028c850d8428a7e]::ty::FieldDef>, <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>, core[bf1d29f64462da08]::result::Result<core[bf1d29f64462da08]::convert::Infallible, rustc_middle[6028c850d8428a7e]::ty::layout::LayoutError>>>>::from_iter
31: 0x11e2155fc - <alloc[4452997152f96314]::vec::Vec<alloc[4452997152f96314]::vec::Vec<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>>> as alloc[4452997152f96314]::vec::spec_from_iter::SpecFromIter<alloc[4452997152f96314]::vec::Vec<rustc_target[579aeb433b1fb1a0]::abi::TyAndLayout<rustc_middle[6028c850d8428a7e]::ty::Ty>>, core[bf1d29f64462da08]::iter::adapters::GenericShunt<core[bf1d29f64462da08]::iter::adapters::map::Map<core[bf1d29f64462da08]::slice::iter::Iter<rustc_middle[6028c850d8428a7e]::ty::VariantDef>, <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>, core[bf1d29f64462da08]::result::Result<core[bf1d29f64462da08]::convert::Infallible, rustc_middle[6028c850d8428a7e]::ty::layout::LayoutError>>>>::from_iter
32: 0x11e1dc3b2 - <rustc_middle[6028c850d8428a7e]::ty::layout::LayoutCx<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt>>::layout_of_uncached
33: 0x11e1f6536 - rustc_middle[6028c850d8428a7e]::ty::layout::layout_of
34: 0x11d503758 - rustc_query_system[d6602a5114bfb900]::query::plumbing::get_query::<rustc_query_impl[da14cdaa7c74b32b]::queries::layout_of, rustc_query_impl[da14cdaa7c74b32b]::plumbing::QueryCtxt>
35: 0x11d74d360 - <rustc_query_impl[da14cdaa7c74b32b]::Queries as rustc_middle[6028c850d8428a7e]::ty::query::QueryEngine>::layout_of
36: 0x11d7afa70 - rustc_codegen_ssa[50d8efce28531570]::debuginfo::type_names::push_debuginfo_type_name
37: 0x11d7b1919 - rustc_codegen_ssa[50d8efce28531570]::debuginfo::type_names::push_debuginfo_type_name
38: 0x11d7aec17 - rustc_codegen_ssa[50d8efce28531570]::debuginfo::type_names::compute_debuginfo_type_name
39: 0x119ffea7c - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_dyn_type_di_node
40: 0x119fff0c0 - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::type_di_node
41: 0x119ffe6df - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_pointer_or_reference_di_node
42: 0x119fff1ae - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::type_di_node
43: 0x119ff260d - <&mut rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_struct_type_di_node::{closure#0}::{closure#0} as core[bf1d29f64462da08]::ops::function::FnOnce<((usize, &rustc_middle[6028c850d8428a7e]::ty::FieldDef),)>>::call_once
44: 0x11a028b61 - <smallvec[5b7c613378500725]::SmallVec<[&rustc_codegen_llvm[7611e23cd93720f5]::llvm_::ffi::Metadata; 16usize]> as core[bf1d29f64462da08]::iter::traits::collect::Extend<&rustc_codegen_llvm[7611e23cd93720f5]::llvm_::ffi::Metadata>>::extend::<core[bf1d29f64462da08]::iter::adapters::map::Map<core[bf1d29f64462da08]::iter::adapters::enumerate::Enumerate<core[bf1d29f64462da08]::slice::iter::Iter<rustc_middle[6028c850d8428a7e]::ty::FieldDef>>, rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_struct_type_di_node::{closure#0}::{closure#0}>>
45: 0x119f066c7 - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::type_map::build_type_with_children::<rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_struct_type_di_node::{closure#0}, rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_struct_type_di_node::{closure#1}>
46: 0x11a0016d5 - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_struct_type_di_node
47: 0x119fff510 - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::type_di_node
48: 0x119ffe6df - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::build_pointer_or_reference_di_node
49: 0x119ffef8e - rustc_codegen_llvm[7611e23cd93720f5]::debuginfo::metadata::type_di_node
50: 0x119fb8a40 - <rustc_codegen_llvm[7611e23cd93720f5]::context::CodegenCx as rustc_codegen_ssa[50d8efce28531570]::traits::debuginfo::DebugInfoMethods>::dbg_scope_fn::get_function_signature
51: 0x119f9d150 - <rustc_codegen_llvm[7611e23cd93720f5]::context::CodegenCx as rustc_codegen_ssa[50d8efce28531570]::traits::debuginfo::DebugInfoMethods>::dbg_scope_fn
52: 0x119f9cd58 - <rustc_codegen_llvm[7611e23cd93720f5]::context::CodegenCx as rustc_codegen_ssa[50d8efce28531570]::traits::debuginfo::DebugInfoMethods>::create_function_debug_context
53: 0x11a007425 - rustc_codegen_ssa[50d8efce28531570]::mir::codegen_mir::<rustc_codegen_llvm[7611e23cd93720f5]::builder::Builder>
54: 0x119ef0d39 - rustc_codegen_ssa[50d8efce28531570]::base::codegen_instance::<rustc_codegen_llvm[7611e23cd93720f5]::builder::Builder>
55: 0x119fdd76a - <rustc_middle[6028c850d8428a7e]::mir::mono::MonoItem as rustc_codegen_ssa[50d8efce28531570]::mono_item::MonoItemExt>::define::<rustc_codegen_llvm[7611e23cd93720f5]::builder::Builder>
56: 0x119f3b9f7 - rustc_codegen_llvm[7611e23cd93720f5]::base::compile_codegen_unit::module_codegen
57: 0x119f791bb - <rustc_query_system[d6602a5114bfb900]::dep_graph::graph::DepGraph<rustc_middle[6028c850d8428a7e]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[6028c850d8428a7e]::ty::context::TyCtxt, rustc_span[ea6bf71f02730d2e]::symbol::Symbol, rustc_codegen_ssa[50d8efce28531570]::ModuleCodegen<rustc_codegen_llvm[7611e23cd93720f5]::ModuleLlvm>>
58: 0x119f3b2b6 - rustc_codegen_llvm[7611e23cd93720f5]::base::compile_codegen_unit
59: 0x119f10eef - <rustc_codegen_llvm[7611e23cd93720f5]::LlvmCodegenBackend as rustc_codegen_ssa[50d8efce28531570]::traits::backend::CodegenBackend>::codegen_crate
60: 0x119ebc1e2 - <rustc_session[46a9cee2ec394bd8]::session::Session>::time::<alloc[4452997152f96314]::boxed::Box<dyn core[bf1d29f64462da08]::any::Any>, rustc_interface[bad71de8e7671400]::passes::start_codegen::{closure#0}>
61: 0x119e71f1b - <rustc_interface[bad71de8e7671400]::passes::QueryContext>::enter::<<rustc_interface[bad71de8e7671400]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[bf1d29f64462da08]::result::Result<alloc[4452997152f96314]::boxed::Box<dyn core[bf1d29f64462da08]::any::Any>, rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>
62: 0x119e55e99 - <rustc_interface[bad71de8e7671400]::queries::Queries>::ongoing_codegen
63: 0x119cf43ea - <rustc_interface[bad71de8e7671400]::interface::Compiler>::enter::<rustc_driver[68f5af5f4fbd43df]::run_compiler::{closure#1}::{closure#2}, core[bf1d29f64462da08]::result::Result<core[bf1d29f64462da08]::option::Option<rustc_interface[bad71de8e7671400]::queries::Linker>, rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>
64: 0x119d16788 - rustc_span[ea6bf71f02730d2e]::with_source_map::<core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>, rustc_interface[bad71de8e7671400]::interface::create_compiler_and_run<core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>, rustc_driver[68f5af5f4fbd43df]::run_compiler::{closure#1}>::{closure#1}>
65: 0x119cf690a - rustc_interface[bad71de8e7671400]::interface::create_compiler_and_run::<core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>, rustc_driver[68f5af5f4fbd43df]::run_compiler::{closure#1}>
66: 0x119cecb85 - <scoped_tls[b249fb2a4ee1394c]::ScopedKey<rustc_span[ea6bf71f02730d2e]::SessionGlobals>>::set::<rustc_interface[bad71de8e7671400]::interface::run_compiler<core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>, rustc_driver[68f5af5f4fbd43df]::run_compiler::{closure#1}>::{closure#0}, core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>
67: 0x119ce8e39 - std[ff2381176b90674b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[bad71de8e7671400]::util::run_in_thread_pool_with_globals<rustc_interface[bad71de8e7671400]::interface::run_compiler<core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>, rustc_driver[68f5af5f4fbd43df]::run_compiler::{closure#1}>::{closure#0}, core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>::{closure#0}, core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>
68: 0x119d1d832 - <<std[ff2381176b90674b]::thread::Builder>::spawn_unchecked_<rustc_interface[bad71de8e7671400]::util::run_in_thread_pool_with_globals<rustc_interface[bad71de8e7671400]::interface::run_compiler<core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>, rustc_driver[68f5af5f4fbd43df]::run_compiler::{closure#1}>::{closure#0}, core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>::{closure#0}, core[bf1d29f64462da08]::result::Result<(), rustc_errors[303ac6616d2d060]::ErrorGuaranteed>>::{closure#1} as core[bf1d29f64462da08]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
69: 0x10ba3d3c7 - std::sys::unix::thread::Thread::new::thread_start::he574bd67be95381d
70: 0x7ff819ff54f4 - __pthread_start
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.61.0-nightly (52b34550a 2022-03-15) running on x86_64-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:
#0 [is_sized_raw] computing whether `dyn std::io::Write` is `Sized`
#1 [layout_of] computing layout of `*const dyn std::io::Write`
#2 [layout_of] computing layout of `core::ptr::unique::Unique<dyn std::io::Write>`
#3 [layout_of] computing layout of `alloc::boxed::Box<dyn std::io::Write>`
end of query stack
error: could not compile `tracing-subscriber`
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Critical priorityStatus: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.Performance or correctness regression from stable to nightly.