Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. -- MCVE: :
"Minimised" to a reproducer involving 3 crates, 2 of which are empty: . The crates are laid out like so: root and mymacro are both empty, dep contains the following code: Using that repro I used cargo-bisect to find the offending commit: searched nightlies: from nightly-2021-03-28 to nightly-2021-06-27 regressed nightly: nightly-2021-05-19 searched commits: from to regressed commit: () <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.0</summaryHost triple: x8664-unknown-linux-gnu Reproduce with: </details
It's worth adding that this was triggered by syn, so it will probably occur for all crates that depend on a proc macro that depends on syn (i.e. basically everything).
Uhh is not the PR I would have expected but I guess cc just in case you know why this broke?
Repros on godbolt, so the 2 empty crates don't seem needed: Agreed, I'm also completely surprised that the change would break this. Only thing I could think of would be that somehow it propagated a different type that somehow still compiled, but I've never seen an example of that. And the layout stuff is using , which is quite well-behaved -- no weird s that could potentially have it do strange things -- and even then it's very sparse on usage. Unless maybe it's another instance of something getting confused by the default parameter on FromResidual somehow? (Not sure how it could be, but came to mind.) <details<summaryFull backtrace from a build with debug info, in case it helps somebody</summary<prethread 'rustc' panicked at 'internal error: entered unreachable code: FieldsShape::offset: s have no fields', compilerrustctargetsrcabi stack backtrace: 0: 0x7ffa13ee5ef6 - std::backtracers::backtrace::dbghelp::trace at C:srcrustlibrarybacktracesrcbacktrace 1: 0x7ffa13ee5ef6 - std::backtracers::backtrace::traceunsynchronized<closure-1at C:srcrustlibrarybacktracesrcbacktrace 2: 0x7ffa13ef37d0 - std::syscommon::backtrace::printfmt at C:srcrustlibrarystdsrcsyscommon 3: 0x7ffa13ef37d0 - std::syscommon::backtrace::print::{{impl}}::fmt at C:srcrustlibrarystdsrcsyscommon 4: 0x7ffa13f128ab - core::fmt::write at C:srcrustlibrarycoresrcfmt 5: 0x7ffa13ef0e18 - std::io::Write::writefmt<std::sys::windows::stdio::Stderrat C:srcrustlibrarystdsrcio 6: 0x7ffa13ef49e4 - std::syscommon::backtrace::print at C:srcrustlibrarystdsrcsyscommon 7: 0x7ffa13ef49e4 - std::syscommon::backtrace::print at C:srcrustlibrarystdsrcsyscommon 8: 0x7ffa13ef49e4 - std::panicking::defaulthook::{{closure}} at C:srcrustlibrarystdsrc 9: 0x7ffa13ef4660 - std::panicking::defaulthook at C:srcrustlibrarystdsrc 10: 0x7ff9d2f96690 - alloc::boxed::{{impl}}::call at C:srcrustlibraryallocsrc 11: 0x7ff9d2f96690 - rustcdriver::reportice at C:srcrustcompilerrustcdriversrc 12: 0x7ffa13ef51ef - std::panicking::rustpanicwithhook at C:srcrustlibrarystdsrc 13: 0x7ffa13ef4da1 - std::panicking::beginpanichandler::{{closure}} at C:srcrustlibrarystdsrc 14: 0x7ffa13ef3a6f - std::syscommon::backtrace::rustendshortbacktrace<closure-0,!at C:srcrustlibrarystdsrcsyscommon 15: 0x7ffa13ef4cf2 - std::panicking::beginpanichandler at C:srcrustlibrarystdsrc 16: 0x7ffa13f39a30 - core::panicking::panicfmt at C:srcrustlibrarycoresrc 17: 0x7ff9d4a4525a - rustctarget::abi::FieldsShape::offset at C:srcrustcompilerrustctargetsrcabi 18: 0x7ff9d47ff58a - rustcmiddle::ty::layout::{{impl}}::recordlayoutforprintingoutlined::{{closure}}::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 19: 0x7ff9d47ff58a - core::iter::adapters::map::mapfold::{{closure}} at C:srcrustlibrarycoresrciteradapters 20: 0x7ff9d47ff58a - core::iter::adapters::enumerate::{{impl}}::fold::enumerate::{{closure}} at C:srcrustlibrarycoresrciteradapters 21: 0x7ff9d47ff58a - core::iter::traits::iterator::Iterator::fold at C:srcrustlibrarycoresrcitertraits 22: 0x7ff9d47ff58a - core::iter::adapters::enumerate::{{impl}}::fold at C:srcrustlibrarycoresrciteradapters 23: 0x7ff9d47ff58a - core::iter::adapters::map::{{impl}}::fold<rustcsession::codestats::FieldInfo,core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<rustcspan::symbol::Symbol,closure-0,tuple<,closure-0at C:srcrustlibrarycoresrciteradapters 24: 0x7ff9d4781571 - core::iter::traits::iterator::Iterator::foreach at C:srcrustlibrarycoresrcitertraits 25: 0x7ff9d4781571 - alloc::vec::specextend::{{impl}}::specextend at C:srcrustlibraryallocsrcvec 26: 0x7ff9d4781571 - alloc::vec::specfromiternested::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 27: 0x7ff9d4781571 - alloc::vec::specfromiter::{{impl}}::fromiter<rustcsession::codestats::FieldInfo,core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<rustcspan::symbol::Symbol, closure-0at C:srcrustlibraryallocsrcvec 28: 0x7ff9d48d751f - alloc::vec::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 29: 0x7ff9d48d751f - core::iter::traits::iterator::Iterator::collect at C:srcrustlibrarycoresrcitertraits 30: 0x7ff9d48d751f - rustcmiddle::ty::layout::{{impl}}::recordlayoutforprintingoutlined::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 31: 0x7ff9d48d751f - rustcmiddle::ty::layout::LayoutCx::recordlayoutforprintingoutlined at C:srcrustcompilerrustcmiddlesrcty 32: 0x7ff9d48d751f - rustcmiddle::ty::layout::LayoutCx::recordlayoutforprinting at C:srcrustcompilerrustcmiddlesrcty 33: 0x7ff9d48d751f - rustcmiddle::ty::layout::{{impl}}::layoutof at C:srcrustcompilerrustcmiddlesrcty 34: 0x7ff9d480246c - rustcmiddle::ty::layout::{{impl}}::layoutrawuncached::{{closure}}::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 35: 0x7ff9d480246c - core::iter::adapters::map::maptryfold::{{closure}} at C:srcrustlibrarycoresrciteradapters 36: 0x7ff9d480246c - core::iter::traits::iterator::Iterator::tryfold at C:srcrustlibrarycoresrcitertraits 37: 0x7ff9d480246c - core::iter::adapters::map::{{impl}}::tryfold<core::result::Result<rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS, rustcmiddle::ty::layout::LayoutError,core::slice::iter::Iter<rustcmiddle::ty::FieldDef,closure-0,tuple<,closure-0,core::ops::co at C:srcrustlibrarycoresrciteradapters 38: 0x7ff9d48bc004 - core::iter::adapters::{{impl}}::tryfold at C:srcrustlibrarycoresrciteradapters 39: 0x7ff9d48bc004 - core::iter::traits::iterator::Iterator::find at C:srcrustlibrarycoresrcitertraits 40: 0x7ff9d48bc004 - core::iter::adapters::{{impl}}::next<core::iter::adapters::map::Map<core::slice::iter::Iter<rustcmiddle::ty::FieldDef, closure-0,rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS,rustcmiddle::ty::layout::LayoutErrorat C:srcrustlibrarycoresrciteradapters 41: 0x7ff9d4781826 - alloc::vec::specfromiternested::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 42: 0x7ff9d4781826 - alloc::vec::specfromiter::{{impl}}::fromiter<rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS,core::iter::adapters::ResultShunt<core::iter::adapters::map::Map<core::slice::iter::Iter<rustcmiddle::ty::FieldDef, closure-0, rustcmiddle::ty::layo at C:srcrustlibraryallocsrcvec 43: 0x7ff9d48c0417 - alloc::vec::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 44: 0x7ff9d48c0417 - core::iter::traits::iterator::Iterator::collect at C:srcrustlibrarycoresrcitertraits 45: 0x7ff9d48c0417 - core::result::{{impl}}::fromiter::{{closure}} at C:srcrustlibrarycoresrc 46: 0x7ff9d48c0417 - core::iter::adapters::processresults<core::iter::adapters::map::Map<core::slice::iter::Iter<rustcmiddle::ty::FieldDef, closure-0,rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS,rustcmiddle::ty::layout::LayoutError,closure-0,alloc::vec::Vec<rus at C:srcrustlibrarycoresrciteradapters 47: 0x7ff9d4800c22 - core::result::{{impl}}::fromiter at C:srcrustlibrarycoresrc 48: 0x7ff9d4800c22 - core::iter::traits::iterator::Iterator::collect at C:srcrustlibrarycoresrcitertraits 49: 0x7ff9d4800c22 - rustcmiddle::ty::layout::{{impl}}::layoutrawuncached::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 50: 0x7ff9d4800c22 - core::iter::adapters::map::maptryfold::{{closure}} at C:srcrustlibrarycoresrciteradapters 51: 0x7ff9d4800c22 - core::iter::traits::iterator::Iterator::tryfold at C:srcrustlibrarycoresrcitertraits 52: 0x7ff9d4800c22 - core::iter::adapters::map::{{impl}}::tryfold<core::result::Result<alloc::vec::Vec<rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS, alloc::alloc::Global, rustcmiddle::ty::layout::LayoutError,core::slice::iter::Iter<rustcmiddle::ty::VariantDef, at C:srcrustlibrarycoresrciteradapters 53: 0x7ff9d48bc055 - core::iter::adapters::{{impl}}::tryfold at C:srcrustlibrarycoresrciteradapters 54: 0x7ff9d48bc055 - core::iter::traits::iterator::Iterator::find at C:srcrustlibrarycoresrcitertraits 55: 0x7ff9d48bc055 - core::iter::adapters::{{impl}}::next<core::iter::adapters::map::Map<core::slice::iter::Iter<rustcmiddle::ty::VariantDef, closure-5,alloc::vec::Vec<rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS, alloc::alloc::Global,rustcmiddle::ty::layout::L at C:srcrustlibrarycoresrciteradapters 56: 0x7ff9d478597f - alloc::vec::Vec::extenddesugared at C:srcrustlibraryallocsrcvec 57: 0x7ff9d478597f - alloc::vec::specextend::{{impl}}::specextend at C:srcrustlibraryallocsrcvec 58: 0x7ff9d478597f - alloc::vec::specfromiternested::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 59: 0x7ff9d478597f - alloc::vec::specfromiter::{{impl}}::fromiter<alloc::vec::Vec<rustctarget::abi::TyAndLayout<rustcmiddle::ty::TyS, alloc::alloc::Global,core::iter::adapters::ResultShunt<core::iter::adapters::map::Map<core::slice::iter::Iter<rustcmiddle::ty::Varian at C:srcrustlibraryallocsrcvec 60: 0x7ff9d48ce0d4 - alloc::vec::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 61: 0x7ff9d48ce0d4 - rustcindex::vec::{{impl}}::fromiter at C:srcrustcompilerrustcindexsrc 62: 0x7ff9d48ce0d4 - core::iter::traits::iterator::Iterator::collect at C:srcrustlibrarycoresrcitertraits 63: 0x7ff9d48ce0d4 - core::result::{{impl}}::fromiter::{{closure}} at C:srcrustlibrarycoresrc 64: 0x7ff9d48ce0d4 - core::iter::adapters::processresults at C:srcrustlibrarycoresrciteradapters 65: 0x7ff9d48ce0d4 - core::result::{{impl}}::fromiter at C:srcrustlibrarycoresrc 66: 0x7ff9d48ce0d4 - core::iter::traits::iterator::Iterator::collect at C:srcrustlibrarycoresrcitertraits 67: 0x7ff9d48ce0d4 - rustcmiddle::ty::layout::LayoutCx::layoutrawuncached at C:srcrustcompilerrustcmiddlesrcty 68: 0x7ff9d48ca60d - rustcmiddle::ty::layout::layoutraw::{{closure}}::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 69: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::entercontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 70: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::settlv at C:srcrustcompilerrustcmiddlesrcty 71: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::entercontext at C:srcrustcompilerrustcmiddlesrcty 72: 0x7ff9d48ca60d - rustcmiddle::ty::layout::layoutraw::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 73: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::withrelatedcontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 74: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::withcontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 75: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::withcontextopt at C:srcrustcompilerrustcmiddlesrcty 76: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::withcontext at C:srcrustcompilerrustcmiddlesrcty 77: 0x7ff9d48ca60d - rustcmiddle::ty::context::tls::withrelatedcontext at C:srcrustcompilerrustcmiddlesrcty 78: 0x7ff9d48ca60d - rustcmiddle::ty::layout::layoutraw at C:srcrustcompilerrustcmiddlesrcty 79: 0x7ff9d388bf3f - rustcquerysystem::query::plumbing::tryexecutequery::{{closure}} at C:srcrustcompilerrustcquerysystemsrcquery 80: 0x7ff9d388bf3f - stacker::maybegrow at C:Usersxxx.cargoregistrysrcstacker-0.1.12src 81: 0x7ff9d388bf3f - rustcdatastructures::stack::ensuresufficientstack<core::result::Result<rustctarget::abi::Layout, rustcmiddle::ty::layout::LayoutError,closure-0at C:srcrustcompilerrustcdatastructuressrc 82: 0x7ff9d39eaf59 - rustcqueryimpl::plumbing::{{impl}}::startquery::{{closure}}::{{closure}} at C:srcrustcompilerrustcqueryimplsrc 83: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::entercontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 84: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::settlv at C:srcrustcompilerrustcmiddlesrcty 85: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::entercontext at C:srcrustcompilerrustcmiddlesrcty 86: 0x7ff9d39eaf59 - rustcqueryimpl::plumbing::{{impl}}::startquery::{{closure}} at C:srcrustcompilerrustcqueryimplsrc 87: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::withrelatedcontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 88: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::withcontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 89: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::withcontextopt at C:srcrustcompilerrustcmiddlesrcty 90: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::withcontext at C:srcrustcompilerrustcmiddlesrcty 91: 0x7ff9d39eaf59 - rustcmiddle::ty::context::tls::withrelatedcontext at C:srcrustcompilerrustcmiddlesrcty 92: 0x7ff9d39eaf59 - rustcqueryimpl::plumbing::{{impl}}::startquery at C:srcrustcompilerrustcqueryimplsrc 93: 0x7ff9d39eaf59 - rustcquerysystem::query::plumbing::tryexecutequery at C:srcrustcompilerrustcquerysystemsrcquery 94: 0x7ff9d39eaf59 - rustcquerysystem::query::plumbing::getqueryimpl<rustcqueryimpl::plumbing::QueryCtxt,rustcquerysystem::query::caches::DefaultCache<rustcmiddle::ty::ParamEnvAnd<rustcmiddle::ty::TyS, core::result::Result<rustctarget::abi::Layout, rustcmiddle: at C:srcrustcompilerrustcquerysystemsrcquery 95: 0x7ff9d3abd084 - rustcquerysystem::query::plumbing::getquery<rustcqueryimpl::queries::layoutraw,rustcqueryimpl::plumbing::QueryCtxtat C:srcrustcompilerrustcquerysystemsrcquery 96: 0x7ff9d38c7bbe - rustcqueryimpl::{{impl}}::layoutraw at C:srcrustcompilerrustcqueryimplsrc 97: 0x7ff9d48d71dc - rustcmiddle::ty::query::TyCtxtAt::layoutraw at C:srcrustcompilerrustcmiddlesrctyquery 98: 0x7ff9d48d71dc - rustcmiddle::ty::context::TyCtxt::layoutraw at C:srcrustcompilerrustcmiddlesrctyquery 99: 0x7ff9d48d71dc - rustcmiddle::ty::layout::{{impl}}::layoutof at C:srcrustcompilerrustcmiddlesrcty 100: 0x7ff9d30dab68 - rustcmiddle::ty::context::TyCtxt::layoutof at C:srcrustcompilerrustcmiddlesrcty 101: 0x7ff9d30dab68 - rustccodegenllvm::context::{{impl}}::spannedlayoutof at C:srcrustcompilerrustccodegenllvmsrc 102: 0x7ff9d30dab68 - rustccodegenssa::mir::analyze::nonssalocals::{{closure}} at C:srcrustcompilerrustccodegenssasrcmir 103: 0x7ff9d30dab68 - core::iter::adapters::map::mapfold::{{closure}} at C:srcrustlibrarycoresrciteradapters 104: 0x7ff9d30dab68 - core::iter::traits::iterator::Iterator::fold at C:srcrustlibrarycoresrcitertraits 105: 0x7ff9d30dab68 - core::iter::adapters::map::{{impl}}::fold<rustccodegenssa::mir::analyze::LocalKind,core::slice::iter::Iter<rustcmiddle::mir::LocalDecl,closure-0,tuple<,closure-0at C:srcrustlibrarycoresrciteradapters 106: 0x7ff9d31756a2 - core::iter::traits::iterator::Iterator::foreach at C:srcrustlibrarycoresrcitertraits 107: 0x7ff9d31756a2 - alloc::vec::specextend::{{impl}}::specextend at C:srcrustlibraryallocsrcvec 108: 0x7ff9d31756a2 - alloc::vec::specfromiternested::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 109: 0x7ff9d31756a2 - alloc::vec::specfromiter::{{impl}}::fromiter<rustccodegenssa::mir::analyze::LocalKind,core::iter::adapters::map::Map<core::slice::iter::Iter<rustcmiddle::mir::LocalDecl, closure-0at C:srcrustlibraryallocsrcvec 110: 0x7ff9d30fda4f - alloc::vec::{{impl}}::fromiter at C:srcrustlibraryallocsrcvec 111: 0x7ff9d30fda4f - rustcindex::vec::{{impl}}::fromiter at C:srcrustcompilerrustcindexsrc 112: 0x7ff9d30fda4f - core::iter::traits::iterator::Iterator::collect at C:srcrustlibrarycoresrcitertraits 113: 0x7ff9d30fda4f - rustccodegenssa::mir::analyze::nonssalocals<rustccodegenllvm::builder::Builderat C:srcrustcompilerrustccodegenssasrcmir 114: 0x7ff9d31999e2 - rustccodegenssa::mir::codegenmir<rustccodegenllvm::builder::Builderat C:srcrustcompilerrustccodegenssasrcmir 115: 0x7ff9d3164262 - rustccodegenssa::base::codegeninstance<rustccodegenllvm::builder::Builderat C:srcrustcompilerrustccodegenssasrc 116: 0x7ff9d313fe4c - rustccodegenssa::monoitem::{{impl}}::define<rustccodegenllvm::builder::Builderat C:srcrustcompilerrustccodegenssasrc 117: 0x7ff9d3158c6b - rustccodegenllvm::base::compilecodegenunit::modulecodegen at C:srcrustcompilerrustccodegenllvmsrc 118: 0x7ff9d31455a5 - rustcquerysystem::depgraph::graph::DepGraph::withtaskimpl at C:srcrustcompilerrustcquerysystemsrcdepgraph 119: 0x7ff9d31455a5 - rustcquerysystem::depgraph::graph::DepGraph::withtask<rustcmiddle::depgraph::depnode::DepKind,rustcmiddle::ty::context::TyCtxt,rustcspan::symbol::Symbol,rustccodegenssa::ModuleCodegen<rustccodegenllvm::ModuleLlvm,fn(mut rustcmiddle::ich::hc at C:srcrustcompilerrustcquerysystemsrcdepgraph 120: 0x7ff9d31587a2 - rustccodegenllvm::base::compilecodegenunit at C:srcrustcompilerrustccodegenllvmsrc 121: 0x7ff9d31622cc - rustccodegenllvm::{{impl}}::compilecodegenunit at C:srcrustcompilerrustccodegenllvmsrc 122: 0x7ff9d31622cc - rustccodegenssa::base::codegencrate<rustccodegenllvm::LlvmCodegenBackendat C:srcrustcompilerrustccodegenssasrc 123: 0x7ff9d314f3da - rustccodegenllvm::{{impl}}::codegencrate at C:srcrustcompilerrustccodegenllvmsrc 124: 0x7ff9d2ff2cac - rustcinterface::passes::startcodegen::{{closure}} at C:srcrustcompilerrustcinterfacesrc 125: 0x7ff9d2ff2cac - rustcdatastructures::profiling::VerboseTimingGuard::run at C:srcrustcompilerrustcdatastructuressrc 126: 0x7ff9d2ff2cac - rustcsession::session::Session::time<alloc::boxed::Box<Any, alloc::alloc::Global,closure-0at C:srcrustcompilerrustcsessionsrc 127: 0x7ff9d300dd5a - rustcinterface::passes::startcodegen at C:srcrustcompilerrustcinterfacesrc 128: 0x7ff9d302be30 - rustcinterface::queries::{{impl}}::ongoingcodegen::{{closure}}::{{closure}} at C:srcrustcompilerrustcinterfacesrc 129: 0x7ff9d302be30 - rustcinterface::passes::{{impl}}::enter::{{closure}} at C:srcrustcompilerrustcinterfacesrc 130: 0x7ff9d302be30 - rustcmiddle::ty::context::tls::entercontext::{{closure}} at C:srcrustcompilerrustcmiddlesrcty 131: 0x7ff9d302be30 - rustcmiddle::ty::context::tls::settlv at C:srcrustcompilerrustcmiddlesrcty 132: 0x7ff9d302be30 - rustcmiddle::ty::context::tls::entercontext at C:srcrustcompilerrustcmiddlesrcty 133: 0x7ff9d302be30 - rustcinterface::passes::QueryContext::enter at C:srcrustcompilerrustcinterfacesrc 134: 0x7ff9d302be30 - rustcinterface::queries::{{impl}}::ongoingcodegen::{{closure}} at C:srcrustcompilerrustcinterfacesrc 135: 0x7ff9d302be30 - rustcinterface::queries::Query::compute<alloc::boxed::Box<Any, alloc::alloc::Global,closure-0at C:srcrustcompilerrustcinterfacesrc 136: 0x7ff9d2ffd62a - rustcinterface::queries::Queries::ongoingcodegen at C:srcrustcompilerrustcinterfacesrc 137: 0x7ff9d2f6607d - rustcdriver::runcompiler::{{closure}}::{{closure}} at C:srcrustcompilerrustcdriversrc 138: 0x7ff9d2f6607d - rustcinterface::interface::Compiler::enter<closure-2,core::result::Result<core::option::Option<rustcinterface::queries::Linker, rustcerrors::ErrorReportedat C:srcrustcompilerrustcinterfacesrc 139: 0x7ff9d2f722d0 - rustcdriver::runcompiler::{{closure}} at C:srcrustcompilerrustcdriversrc 140: 0x7ff9d2f722d0 - rustcinterface::interface::createcompilerandrun::{{closure}} at C:srcrustcompilerrustcinterfacesrc 141: 0x7ff9d2f722d0 - rustcspan::withsourcemap<core::result::Result<tuple<, rustcerrors::ErrorReported,closure-0at C:srcrustcompilerrustcspansrc 142: 0x7ff9d2f64a32 - rustcinterface::interface::createcompilerandrun at C:srcrustcompilerrustcinterfacesrc 143: 0x7ff9d2f64a32 - rustcinterface::interface::runcompiler::{{closure}} at C:srcrustcompilerrustcinterfacesrc 144: 0x7ff9d2f64a32 - rustcinterface::util::setupcallbacksandruninthreadpoolwithglobals::{{closure}}::{{closure}} at C:srcrustcompilerrustcinterfacesrc 145: 0x7ff9d2f64a32 - scopedtls::ScopedKey::set<rustcspan::SessionGlobals,closure-0,core::result::Result<tuple<, rustcerrors::ErrorReportedat C:Usersxxx.cargoregistrysrcscoped-tls-1.0.0src 146: 0x7ff9d2f72df8 - rustcspan::withsessionglobals<core::result::Result<tuple<, rustcerrors::ErrorReported,closure-0at C:srcrustcompilerrustcspansrc 147: 0x7ff9d2f7be91 - rustcinterface::util::setupcallbacksandruninthreadpoolwithglobals::{{closure}} at C:srcrustcompilerrustcinterfacesrc 148: 0x7ff9d2f7be91 - rustcinterface::util::scopedthread::{{closure}} at C:srcrustcompilerrustcinterfacesrc 149: 0x7ff9d2f7be91 - std::syscommon::backtrace::rustbeginshortbacktrace<closure-0,tuple<at C:srcrustlibrarystdsrcsyscommon 150: 0x7ff9d2f5fea7 - std::thread::{{impl}}::spawnunchecked::{{closure}}::{{closure}} at C:srcrustlibrarystdsrcthread 151: 0x7ff9d2f5fea7 - std::panic::{{impl}}::callonce at C:srcrustlibrarystdsrc 152: 0x7ff9d2f5fea7 - std::panicking::try::docall at C:srcrustlibrarystdsrc 153: 0x7ff9d2f5fea7 - std::panicking::try<tuple<,std::panic::AssertUnwindSafe<closure-0at C:srcrustlibrarystdsrc 154: 0x7ff9d2f6e639 - std::panic::catchunwind at C:srcrustlibrarystdsrc 155: 0x7ff9d2f6e639 - std::thread::{{impl}}::spawnunchecked::{{closure}} at C:srcrustlibrarystdsrcthread 156: 0x7ff9d2f6e639 - core::ops::function::FnOnce::callonce<closure-0,tuple<at C:srcrustlibrarycoresrcops 157: 0x7ffa13eeae5c - alloc::boxed::{{impl}}::callonce at C:srcrustlibraryallocsrc 158: 0x7ffa13eeae5c - alloc::boxed::{{impl}}::callonce at C:srcrustlibraryallocsrc 159: 0x7ffa13eeae5c - std::sys::windows::thread::{{impl}}::new::thread_start at C:srcrustlibrarystdsrcsyswindows 160: 0x7ffa5b697034 - BaseThreadInitThunk 161: 0x7ffa5c6e2651 - RtlUserThreadStart </pre</summary
Triage: removed the ICE but it doesn't seem like an actual fix. Any other examples to reproduce it?
This still ICEs on <details<summaryBacktrace</summary</details
I ran this on ( at the time of testing) There is that overflows the stack because of some huge structs, and looking for a clippy lint I found this nightly flag. Gave it a go. Oops? <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
I have another minimal reproducer, it's no more enlightening than the first:
Crashed for me on serde_repr crate:
Yay, this works on now :tada:

Discussion:
match layout.variants { Variants::Single { index } => { <del> debug!("print-type-size `{:#?}` variant {}", layout, adt_def.variants[index].ident); if !adt_def.variants.is_empty() { </del> <ins> if !adt_def.variants.is_empty() && layout.fields != FieldsShape::Primitive { debug!( "print-type-size `{:#?}` variant {}", layout, adt_def.variants[index].ident ); </ins> let variant_def = &adt_def.variants[index]; let fields: Vec<_> = variant_def.fields.iter().map(|f| f.ident.name).collect(); record(

fn start(_: isize, _: *const *const u8) -> isize { let _x: Option<!> = None; let _y: Result<u32, !> = Ok(42); <del> 0 </del> <ins> let _z: Result<!, !> = loop {}; </ins> }

print-type-size         field `.0`: 4 bytes print-type-size type: `std::option::Option<!>`: 0 bytes, alignment: 1 bytes print-type-size     variant `None`: 0 bytes <ins> print-type-size type: `std::result::Result<!, !>`: 0 bytes, alignment: 1 bytes </ins>