Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE using a type alias to a const generic struct across crates #61624

Closed
carado opened this issue Jun 7, 2019 · 8 comments · Fixed by #65365
Closed

ICE using a type alias to a const generic struct across crates #61624

carado opened this issue Jun 7, 2019 · 8 comments · Fixed by #65365
Assignees
Labels
A-const-generics Area: const generics (parameters and arguments) A-metadata Area: Crate metadata C-bug Category: This is a bug. F-const_generics `#![feature(const_generics)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@carado
Copy link

carado commented Jun 7, 2019

In a folder a, I have a blank library crate with the following src/lib.rs:

#![feature(const_generics)]

pub struct Struct<const N: usize>([u8; N]);

pub type Alias = Struct<2>;

In a folder b, I have a blank binary crate with the follow src/main.rs:

// note: the error seems to be the same regardless of whether the following line is commented or not
//#![feature(const_generics)]

struct Container(a::Alias);

fn main() {}

b's Cargo.toml uses crate a with the following line:

[dependencies]
a = { path = "../a", version = "" }

Running cargo check or cargo build in b will produce the following ICE:

    Checking b v0.1.0 (/home/carado/tmp/rust7/b)
error: internal compiler error: src/librustc_metadata/decoder.rs:484: entry: id not found: DefIndex(18) in crate a with number 15

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:638:9
stack backtrace:
   0:     0x7f4371ffb19b - backtrace::backtrace::libunwind::trace::h034f17449c8f06d2
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1:     0x7f4371ffb19b - backtrace::backtrace::trace_unsynchronized::h88fceba984274b2d
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2:     0x7f4371ffb19b - std::sys_common::backtrace::_print::h113a7251db1bb0bb
                               at src/libstd/sys_common/backtrace.rs:47
   3:     0x7f4371ffb19b - std::sys_common::backtrace::print::he1709f3e64aa1331
                               at src/libstd/sys_common/backtrace.rs:36
   4:     0x7f4371ffb19b - std::panicking::default_hook::{{closure}}::h4c7c19a95acf509e
                               at src/libstd/panicking.rs:198
   5:     0x7f4371ffae9c - std::panicking::default_hook::haf2a960f108a3f30
                               at src/libstd/panicking.rs:212
   6:     0x7f436fd54dd1 - rustc::util::common::panic_hook::h96cf50c713bc84f6
   7:     0x7f4371ffb9f9 - std::panicking::rust_panic_with_hook::h89241749267406d1
                               at src/libstd/panicking.rs:479
   8:     0x7f436e9a652d - std::panicking::begin_panic::h23f047602abbec1f
   9:     0x7f436e9c661f - rustc_errors::Handler::bug::h1846692de954732d
  10:     0x7f436f9ceac3 - rustc::util::bug::opt_span_bug_fmt::{{closure}}::h4eeb8977ea9f490d
  11:     0x7f436f9ce09a - rustc::ty::context::tls::with_opt::{{closure}}::h4f8aad466ccd8399
  12:     0x7f436f9cdfb5 - rustc::ty::context::tls::with_context_opt::h93eb33abb81e1499
  13:     0x7f436f9ce047 - rustc::ty::context::tls::with_opt::h84f79a4206f98907
  14:     0x7f436f9ce9d8 - rustc::util::bug::opt_span_bug_fmt::hcae1e85db26d61d1
  15:     0x7f436f9ce942 - rustc::util::bug::bug_fmt::h0d9f8eae974cd447
  16:     0x7f437048e53a - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry::hd6886155c7e8ad94
  17:     0x7f437048f82c - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::get_type::he89c8116f2a9d946
  18:     0x7f4370499601 - rustc_metadata::cstore_impl::provide_extern::type_of::h81daf21c535e688b
  19:     0x7f436fce71cd - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::type_of>::compute::h6309e2152a5e3c65
  20:     0x7f436f8b5517 - rustc::dep_graph::graph::DepGraph::with_task_impl::had7a0c15c5f1905b
  21:     0x7f436fbb7456 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::hb3169834330de254
  22:     0x7f436f7cea4f - rustc::ty::instance::Instance::resolve::h72798ee26e58abe1
  23:     0x7f436fd411bb - <rustc::traits::project::AssocTypeNormalizer as rustc::ty::fold::TypeFolder>::fold_const::hd5c5bcc5cc84d8c5
  24:     0x7f436f956ffa - <smallvec::SmallVec<A> as core::iter::traits::collect::FromIterator<<A as smallvec::Array>::Item>>::from_iter::h56ca20c895cf1fe3
  25:     0x7f436fa90fec - rustc::ty::fold::TypeFoldable::fold_with::h9620990ca94be452
  26:     0x7f436faacdcd - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable for &rustc::ty::TyS>::super_fold_with::h42aca40e5d6f720c
  27:     0x7f436fd40b65 - <rustc::traits::project::AssocTypeNormalizer as rustc::ty::fold::TypeFolder>::fold_ty::h0000082e2319606a
  28:     0x7f436cd1ed64 - rustc::traits::project::normalize::hbd56f85fc248fb4d
  29:     0x7f436cb40590 - rustc_typeck::check::FnCtxt::normalize_associated_types_in::h8d3d18278d4fdeda
  30:     0x7f436cd664b0 - <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h7a0fbf29f0ae4dd7
  31:     0x7f436ccb1f67 - rustc::ty::context::GlobalCtxt::enter_local::h05475195df7a61f1
  32:     0x7f436cd92e9b - rustc_typeck::check::wfcheck::check_item_well_formed::hdb36490216ee054e
  33:     0x7f436cb6165e - rustc::ty::query::__query_compute::check_item_well_formed::he41baf5c84b70167
  34:     0x7f436cc2b7bd - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::check_item_well_formed>::compute::h7c840c44c057109d
  35:     0x7f436cb966fb - rustc::dep_graph::graph::DepGraph::with_task_impl::h9a2f7b5bbc29bc70
  36:     0x7f436cc876f0 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::ha95df13349dc610e
  37:     0x7f436cd96967 - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc::hir::itemlikevisit::ParItemLikeVisitor>::visit_item::ha1c79ec81b0ae69c
  38:     0x7f437200c8ea - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:85
  39:     0x7f436cba2519 - rustc_data_structures::sync::par_for_each_in::he5330af9a7aa0673
  40:     0x7f437200c8ea - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:85
  41:     0x7f436cd59313 - rustc::hir::Crate::par_visit_all_item_likes::h7e35cc6980d7d055
  42:     0x7f436cb64fcd - rustc::util::common::time::h7201fa0034b9369a
  43:     0x7f436cd78a28 - rustc_typeck::check_crate::h2869f0da763831fb
  44:     0x7f43719ceb45 - rustc_interface::passes::analysis::h3924fc0f51a4916f
  45:     0x7f437235b576 - rustc::ty::query::__query_compute::analysis::hecebb52178cb72d8
  46:     0x7f43722c5e02 - rustc::dep_graph::graph::DepGraph::with_task_impl::h13f978acfb884bfb
  47:     0x7f43722bfe0d - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::h41a19a7094d84ad5
  48:     0x7f43722cfdc6 - rustc::ty::context::tls::enter_global::hde76617de84f513e
  49:     0x7f43722ee377 - rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}::h7e90e4645ca62211
  50:     0x7f4371a2c4d5 - rustc_interface::passes::create_global_ctxt::{{closure}}::hd1ffcd24d8253592
  51:     0x7f43722ef6ba - rustc_interface::interface::run_compiler_in_existing_thread_pool::hbb3327ac4471db7f
  52:     0x7f4372361346 - std::thread::local::LocalKey<T>::with::h889b3604823f7d6d
  53:     0x7f4372304e65 - scoped_tls::ScopedKey<T>::set::h04ec88caee9f9ad7
  54:     0x7f437232cea4 - syntax::with_globals::h380e3542e6008820
  55:     0x7f437234bd9d - std::sys_common::backtrace::__rust_begin_short_backtrace::h5f9f48a6f860c8d7
  56:     0x7f437200c8ea - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:85
  57:     0x7f43722d7f29 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hc55a01470f319106
  58:     0x7f4371fdeebf - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h3f73aebf71bfd2d8
                               at /rustc/5eeb567a27eba18420a620ca7d0c007e29d8bc0c/src/liballoc/boxed.rs:746
  59:     0x7f437200b5c0 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hf5740d907353c675
                               at /rustc/5eeb567a27eba18420a620ca7d0c007e29d8bc0c/src/liballoc/boxed.rs:746
  60:     0x7f437200b5c0 - std::sys_common::thread::start_thread::h9d627f833866d0b2
                               at src/libstd/sys_common/thread.rs:13
  61:     0x7f437200b5c0 - std::sys::unix::thread::Thread::new::thread_start::h6883c5e892c614cf
                               at src/libstd/sys/unix/thread.rs:79
  62:     0x7f4371f42fa8 - start_thread
                               at /builddir/glibc-2.29/nptl/pthread_create.c:486
  63:     0x7f4371e64a1f - __GI___clone
  64:                0x0 - <unknown>
query stack during panic:
#0 [type_of] processing `a::Alias::{{constant}}#0`
#1 [check_item_well_formed] processing `Container`
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.37.0-nightly (5eeb567a2 2019-06-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `b`.

To learn more, run the command again with --verbose.
@jonas-schievink jonas-schievink added A-const-generics Area: const generics (parameters and arguments) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-metadata Area: Crate metadata labels Jun 7, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Jun 13, 2019

triage: P-high. Assigning to self for initial investigation. Removing I-nominated label.

Cc assigning @varkor as well, as someone who will likely resolve this faster than it will take me to build rustc

@pnkfelix
Copy link
Member

pnkfelix commented Jul 3, 2019

Oh, given that this is using const generics (an unstable feature), it probably should be P-medium rather than P-high.

I won't change the label yet, but if triage on thursday rolls around and I haven't seen a good reason to keep it P-high, I'll change the label then.

@varkor
Copy link
Member

varkor commented Jul 3, 2019

If downstream crates could ICE because they're using a type alias with const generics, even if they don't enable #![feature(const_generics)] themselves, it seems like slightly more of an issue.

(Sorry, I don't have time to look into this issue at the moment.)

@est31
Copy link
Member

est31 commented Jul 3, 2019

It's not just type aliases, but also other constellations of cross-crate usage that are giving this ICE: #61806 (comment)

@pnkfelix
Copy link
Member

I continue to have the impression that if you use stable Rust, it will be used on all of your crates, and therefore you won't hit this bug. (don't get me wrong; I've commented elsewhere, rust-call bug #34901 in particular, where I do worry about impact on downstream crates from upstream crates using certain features that have bugs)

But I still think this only warrants P-medium.

Reclassifying as such.

@pnkfelix pnkfelix added P-medium Medium priority and removed P-high High priority labels Jul 11, 2019
@vadixidav
Copy link
Contributor

Encountered this issue and documented it here. The associated code is here.

@landaire
Copy link

landaire commented Jul 23, 2019

I just hit this issue as well in my project. Unfortunately I cannot share the code I'm hitting this with.

A repro would look very similar to est31's example here, but in my case the affected type isn't even exposed to the bin application. It's pub(crate) only.

Click for stack

   1: std::panicking::take_hook                                                                                                                                                                                                                                                                             
   2: std::panicking::take_hook                                                                                                                                                                                                                                                                             
   3: <rustc::ty::query::queries::analysis as rustc::ty::query::config::QueryDescription>::describe                                                                                                                                                                                                         
   4: std::panicking::rust_panic_with_hook                                                                                                                                                                                                                                                                  
   5: <rustc_errors::diagnostic::SubDiagnostic as core::fmt::Debug>::fmt                                                                                                                                                                                                                                    
   6: rustc_errors::Handler::bug                                                                                                                                                                                                                                                                            
   7: rustc::util::bug::bug_fmt                                                                                                                                                                                                                                                                             
   8: rustc::ty::wf::object_region_bounds                                                                                                                                                                                                                                                                   
   9: rustc::ty::wf::object_region_bounds                                                                                                                                                                                                                                                                   
  10: rustc::ty::wf::object_region_bounds                                                                                                                                                                                                                                                                   
  11: rustc::util::bug::bug_fmt                                                                                                                                                                                                                                                                             
  12: rustc::util::bug::bug_fmt                                                                                                                                                                                                                                                                             
  13: rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry                                                                                                                                                                                                                          
  14: rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::get_type                                                                                                                                                                                                                       
  15: rustc_metadata::cstore_impl::provide_extern                                                                                                                                                                                                                                                           
  16: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item                                                                                                                                                                                                                  
  17: rustc::dep_graph::graph::DepGraph::assert_ignored                                                                                                                                                                                                                                                     
  18: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack                                                                                                                                                                                                                  
  19: rustc::ty::instance::Instance::resolve                                                                                                                                                                                                                                                                
  20: <rustc::traits::query::normalize::QueryNormalizer as rustc::ty::fold::TypeFolder>::fold_const                                                                                                                                                                                                         
  21: rustc::ty::context::TyCtxt::_intern_canonical_var_infos                                                                                                                                                                                                                                               
  22: rustc::ty::fast_reject::simplify_type                                                                                                                                                                                                                                                                 
  23: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::ParamEnv>::lift_to_tcx                                                                                                                                                                                                     
  24: <rustc::traits::query::normalize::QueryNormalizer as rustc::ty::fold::TypeFolder>::fold_ty                                                                                                                                                                                                            
  25: <rustc_lint::types::VariantSizeDifferences as rustc::lint::LintPass>::get_lints                                                                                                                                                                                                                       
  26: <&mut rustc_traits::chalk_context::unify::ChalkTypeRelatingDelegate as rustc::infer::nll_relate::TypeRelatingDelegate>::push_domain_goal                                                                                                                                                              
  27: <&mut rustc_traits::chalk_context::unify::ChalkTypeRelatingDelegate as rustc::infer::nll_relate::TypeRelatingDelegate>::push_domain_goal                                                                                                                                                              
  28: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt                                                                                                                                                                                                                   
  29: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item                                                                                                                                                                                                                  
  30: rustc::dep_graph::graph::DepGraph::assert_ignored                                                                                                                                                                                                                                                     
  31: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack                                                                                                                                                                                                                  
  32: rustc::traits::util::<impl rustc::ty::context::TyCtxt>::impl_item_is_final                                                                                                                                                                                                                            
  33: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of                                                                                                                                                                                                   
  34: <rustc::hir::SyntheticTyParamKind as core::fmt::Debug>::fmt                                                                                                                                                                                                                                           
  35: rustc::hir::intravisit::NestedVisitorMap::inter                                                                                                                                                                                                                                                       
  36: <rustc::util::common::ErrorReported as core::fmt::Debug>::fmt                                                                                                                                                                                                                                         
  37: rustc::hir::intravisit::NestedVisitorMap::inter                                                                                                                                                                                                                                                       
  38: rustc::ty::layout::provide                                                                                                                                                                                                                                                                            
  39: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt                                                                                                                                                                                                                                           
  40: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt                                                                                                                                                                                                                   
  41: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item                                                                                                                                                                                                                  
  42: rustc::dep_graph::graph::DepGraph::assert_ignored                                                                                                                                                                                                                                                     
  43: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack                                                                                                                                                                                                                  
  44: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of                                                                                                                                                                                                   
  45: <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type                                                                                                                                                                                               
  46: <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type                                                                                                                                                                                               
  47: <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type                                                                                                                                                                                               
  48: <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::scalar_pair_element_llvm_type                                                                                                                                                                           
  49: <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type                                                                                                                                                                                               
  50: <rustc_target::abi::call::FnType<&rustc::ty::TyS> as rustc_codegen_llvm::abi::FnTypeLlvmExt>::llvm_type                                                                                                                                                                                               
  51: rustc_codegen_llvm::declare::<impl rustc_codegen_ssa::traits::declare::DeclareMethods for rustc_codegen_llvm::context::CodegenCx>::declare_fn                                                                                                                                                         
  52: rustc_codegen_llvm::mono_item::<impl rustc_codegen_ssa::traits::declare::PreDefineMethods for rustc_codegen_llvm::context::CodegenCx>::predefine_fn                                                                                                                                                   
  53: <rustc_codegen_llvm::back::lto::Linker as core::ops::drop::Drop>::drop                                                                                                                                                                                                                                
  54: <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Iterator>::next                                                                                                                                                                                                                 
  55: <rustc_codegen_llvm::back::lto::Linker as core::ops::drop::Drop>::drop                                                                                                                                                                                                                                
  56: <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Iterator>::next                                                                                                                                                                                                                 
  57: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate                                                                                                                                                                                       
  58: <humantime::date::Rfc3339Timestamp as core::fmt::Debug>::fmt                                                                                                                                                                                                                                          
  59: rustc_interface::passes::BoxedResolver::complete                                                                                                                                                                                                                                                      
  60: <humantime::date::Rfc3339Timestamp as core::fmt::Debug>::fmt                                                                                                                                                                                                                                          
  61: rustc_interface::passes::BoxedResolver::to_expansion_result                                                                                                                                                                                                                                           
  62: flate2::gz::GzHeader::extra                                                                                                                                                                                                                                                                           
  63: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen                                                                                                                                                                                                                
  64: <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt                                                                                                                                                                                                                                   
  65: <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt                                                                                                                                                                                                                                   
  66: <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt                                                                                                                                                                                                                                   
  67: <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt                                                                                                                                                                                                                                   
  68: _rust_maybe_catch_panic                                                                                                                                                                                                                                                                               
  69: <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt                                                                                                                                                                                                                                   
  70: ZN244_$LT$std..error..$LT$impl$u20$core..convert..From$LT$alloc..string..String$GT$$u20$for$u20$alloc..boxed..Box$LT$dyn$u20$std..error..Error$u2b$core..marker..Sync$u2b$core..marker..Send$GT$$GT$..from..StringError$u20$as$u20$core..fmt..Display$GT$3fmt17                                       
  71: std::sys::windows::thread::Thread::new                                                                                                                                                                                                                                                                
  72: BaseThreadInitThunk                                                                                                                                                                                                                                                                                   
  73: RtlUserThreadStart                                                                                                                                                                                                                                                                                    
query stack during panic:                                                                                                                                                                                                                                                                                   
#0 [type_of] processing `REDACTED::{{constant}}#0`                                                                                                                                                                                                              
thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:649:9                                                                                                                                                                                                                                     
stack backtrace:                                                                                                                                                                                                                                                                                            
   0:     0x7ffdf3412d8c - std::sys_common::alloc::realloc_fallback::h704c80e2016671f8                                                                                                                                                                                                                      
   1:     0x7ffdf34167ce - std::panicking::take_hook::h046f7f877897a7ad                                                                                                                                                                                                                                     
   2:     0x7ffdf3416452 - std::panicking::take_hook::h046f7f877897a7ad                                                                                                                                                                                                                                     
   3:     0x7ffdb92145ce - <rustc::ty::query::queries::analysis as rustc::ty::query::config::QueryDescription>::describe::hb6b6cd67f83ea56f                                                                                                                                                                 
   4:     0x7ffdf3417085 - std::panicking::rust_panic_with_hook::h6f132f2a8a2e71b7                                                                                                                                                                                                                          
   5:     0x7ffdb9b74020 - <rustc_errors::diagnostic::SubDiagnostic as core::fmt::Debug>::fmt::hfb0064d79ea4e650                                                                                                                                                                                            
   6:     0x7ffdb9b5a207 - rustc_errors::Handler::bug::h4a0079b884fb6b5d                                                                                                                                                                                                                                    
   7:     0x7ffdb931b211 - rustc::util::bug::bug_fmt::hca927fe7d91e0d89                                                                                                                                                                                                                                     
   8:     0x7ffdb931aae6 - rustc::ty::wf::object_region_bounds::hc99a98c5fcedf416                                                                                                                                                                                                                           
   9:     0x7ffdb931aa5a - rustc::ty::wf::object_region_bounds::hc99a98c5fcedf416                                                                                                                                                                                                                           
  10:     0x7ffdb931aa9a - rustc::ty::wf::object_region_bounds::hc99a98c5fcedf416                                                                                                                                                                                                                           
  11:     0x7ffdb931b11f - rustc::util::bug::bug_fmt::hca927fe7d91e0d89                                                                                                                                                                                                                                     
  12:     0x7ffdb931b07d - rustc::util::bug::bug_fmt::hca927fe7d91e0d89                                                                                                                                                                                                                                     
  13:     0x7ffdb8de59b7 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry::hd2633ad21c98b0b5                                                                                                                                                                                  
  14:     0x7ffdb8de5b95 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::def_kind::h7827bdb991e2e404                                                                                                                                                                               
  15:     0x7ffdb8df44b7 - rustc_metadata::cstore_impl::provide_extern::h131d83cf6cb3952d                                                                                                                                                                                                                   
  16:     0x7ffdb963562c - rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item::he4177d5a844a7076                                                                                                                                                                          
  17:     0x7ffdb96ec986 - rustc::dep_graph::graph::DepGraph::assert_ignored::h2a01b057f7608d6e                                                                                                                                                                                                             
  18:     0x7ffdb94406cb - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack::h1753461678c23fa5                                                                                                                                                                          
  19:     0x7ffdb9366319 - rustc::ty::print::pretty::RegionHighlightMode::highlighting_bound_region::hb3908208854c2a92                                                                                                                                                                                      
  20:     0x7ffdb935f5e7 - rustc::ty::print::pretty::RegionHighlightMode::highlighting_bound_region::hb3908208854c2a92                                                                                                                                                                                      
  21:     0x7ffdb935b8a1 - rustc::ty::print::pretty::RegionHighlightMode::highlighting_bound_region::hb3908208854c2a92                                                                                                                                                                                      
  22:     0x7ffdb918b6a5 - rustc::ty::print::pretty::<impl core::fmt::Display for &rustc::ty::TyS>::fmt::hf01d9b599dd66d21                                                                                                                                                                                  
  23:     0x7ffdf343fae9 - core::fmt::builders::DebugStruct::field::h8198c77bc9a8f6a2                                                                                                                                                                                                                       
  24:     0x7ffdb9198e4d - <rustc::ty::ParamEnv as core::fmt::Debug>::fmt::hf8f8c75a6c7cfdf8                                                                                                                                                                                                                
  25:     0x7ffdf34409eb - core::fmt::write::h158250b286853c9c                                                                                                                                                                                                                                              
  26:     0x7ffdf34315c8 - alloc::fmt::format::h2894ef712218ed82                                                                                                                                                                                                                                            
  27:     0x7ffdb9753d60 - rustc::ty::query::Query::describe::hf7780e23596df25d                                                                                                                                                                                                                             
  28:     0x7ffdb93fbadc - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack::h1753461678c23fa5                                                                                                                                                                          
  29:     0x7ffdb921463e - <rustc::ty::query::queries::analysis as rustc::ty::query::config::QueryDescription>::describe::hb6b6cd67f83ea56f                                                                                                                                                                 
  30:     0x7ffdf3417085 - std::panicking::rust_panic_with_hook::h6f132f2a8a2e71b7                                                                                                                                                                                                                          
  31:     0x7ffdb9b74020 - <rustc_errors::diagnostic::SubDiagnostic as core::fmt::Debug>::fmt::hfb0064d79ea4e650                                                                                                                                                                                            
  32:     0x7ffdb9b5a207 - rustc_errors::Handler::bug::h4a0079b884fb6b5d                                                                                                                                                                                                                                    
  33:     0x7ffdb931b211 - rustc::util::bug::bug_fmt::hca927fe7d91e0d89                                                                                                                                                                                                                                     
  34:     0x7ffdb931aae6 - rustc::ty::wf::object_region_bounds::hc99a98c5fcedf416                                                                                                                                                                                                                           
  35:     0x7ffdb931aa5a - rustc::ty::wf::object_region_bounds::hc99a98c5fcedf416                                                                                                                                                                                                                           
  36:     0x7ffdb931aa9a - rustc::ty::wf::object_region_bounds::hc99a98c5fcedf416                                                                                                                                                                                                                           
  37:     0x7ffdb931b11f - rustc::util::bug::bug_fmt::hca927fe7d91e0d89                                                                                                                                                                                                                                     
  38:     0x7ffdb931b07d - rustc::util::bug::bug_fmt::hca927fe7d91e0d89                                                                                                                                                                                                                                     
  39:     0x7ffdb8de59b7 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry::hd2633ad21c98b0b5                                                                                                                                                                                  
  40:     0x7ffdb8de6a9c - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::get_type::h089802f601cc827d                                                                                                                                                                               
  41:     0x7ffdb8df066d - rustc_metadata::cstore_impl::provide_extern::h131d83cf6cb3952d                                                                                                                                                                                                                   
  42:     0x7ffdb9634a7c - rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item::he4177d5a844a7076                                                                                                                                                                          
  43:     0x7ffdb96df3d3 - rustc::dep_graph::graph::DepGraph::assert_ignored::h2a01b057f7608d6e                                                                                                                                                                                                             
  44:     0x7ffdb94a17e4 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack::h1753461678c23fa5                                                                                                                                                                          
  45:     0x7ffdb9283e29 - rustc::ty::instance::Instance::resolve::hae5b876dde91880f                                                                                                                                                                                                                        
  46:     0x7ffdb927bcae - <rustc::traits::query::normalize::QueryNormalizer as rustc::ty::fold::TypeFolder>::fold_const::h7412764b8d098722                                                                                                                                                                 
  47:     0x7ffdb9651932 - rustc::ty::context::TyCtxt::_intern_canonical_var_infos::h4843a21b2323a1f1                                                                                                                                                                                                       
  48:     0x7ffdb9152349 - rustc::ty::fast_reject::simplify_type::hbc8cf28d21042664                                                                                                                                                                                                                         
  49:     0x7ffdb91795bd - rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::ParamEnv>::lift_to_tcx::h8ef5562ad5d03122                                                                                                                                                             
  50:     0x7ffdb927b309 - <rustc::traits::query::normalize::QueryNormalizer as rustc::ty::fold::TypeFolder>::fold_ty::hdf6e6fab13c32758                                                                                                                                                                    
  51:     0x7ffdb80d667b - <rustc_lint::types::VariantSizeDifferences as rustc::lint::LintPass>::get_lints::hbc3ba6509ff17f06                                                                                                                                                                               
  52:     0x7ffdb817fe41 - <&mut rustc_traits::chalk_context::unify::ChalkTypeRelatingDelegate as rustc::infer::nll_relate::TypeRelatingDelegate>::push_domain_goal::hd6c786c78f82743a                                                                                                                      
  53:     0x7ffdb811dc9f - <&mut rustc_traits::chalk_context::unify::ChalkTypeRelatingDelegate as rustc::infer::nll_relate::TypeRelatingDelegate>::push_domain_goal::hd6c786c78f82743a                                                                                                                      
  54:     0x7ffdb96a3208 - rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt::hc399db3d39f649e9                                                                                                                                                                           
  55:     0x7ffdb96361d4 - rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item::he4177d5a844a7076                                                                                                                                                                          
  56:     0x7ffdb96f5200 - rustc::dep_graph::graph::DepGraph::assert_ignored::h2a01b057f7608d6e                                                                                                                                                                                                             
  57:     0x7ffdb942c44e - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack::h1753461678c23fa5                                                                                                                                                                          
  58:     0x7ffdb93f2002 - rustc::traits::util::<impl rustc::ty::context::TyCtxt>::impl_item_is_final::h3e3622f37c9b9353                                                                                                                                                                                    
  59:     0x7ffdb920be7d - <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of::h35874203b040ff53                                                                                                                                                           
  60:     0x7ffdb932c846 - <rustc::hir::SyntheticTyParamKind as core::fmt::Debug>::fmt::had7f4e72750b5831                                                                                                                                                                                                   
  61:     0x7ffdb97d6499 - rustc::hir::intravisit::NestedVisitorMap::inter::ha843c108031b6e1a                                                                                                                                                                                                               
  62:     0x7ffdb91b0661 - <rustc::util::common::ErrorReported as core::fmt::Debug>::fmt::h66c5bf790fa31243                                                                                                                                                                                                 
  63:     0x7ffdb97c8699 - rustc::hir::intravisit::NestedVisitorMap::inter::ha843c108031b6e1a                                                                                                                                                                                                               
  64:     0x7ffdb92037e8 - rustc::ty::layout::provide::hc605ca1e26b97864                                                                                                                                                                                                                                    
  65:     0x7ffdb9200534 - <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt::h29dff8e36fb0008b                                                                                                                                                                                                   
  66:     0x7ffdb96a00cf - rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt::hc399db3d39f649e9                                                                                                                                                                           
  67:     0x7ffdb9635a6a - rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item::he4177d5a844a7076                                                                                                                                                                          
  68:     0x7ffdb96f9037 - rustc::dep_graph::graph::DepGraph::assert_ignored::h2a01b057f7608d6e                                                                                                                                                                                                             
  69:     0x7ffdb948b533 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack::h1753461678c23fa5                                                                                                                                                                          
  70:     0x7ffdb920bed3 - <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of::h35874203b040ff53                                                                                                                                                           
  71:     0x7ffdb565bf51 - <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type::h8f80fa95e654501c                                                                                                                                                       
  72:     0x7ffdb565c4ff - <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type::h8f80fa95e654501c                                                                                                                                                       
  73:     0x7ffdb565bdf7 - <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type::h8f80fa95e654501c                                                                                                                                                       
  74:     0x7ffdb565ceb3 - <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::scalar_pair_element_llvm_type::h013edd9347332251                                                                                                                                   
  75:     0x7ffdb565c171 - <rustc_target::abi::TyLayout<&rustc::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type::h8f80fa95e654501c                                                                                                                                                       
  76:     0x7ffdb54ee0e1 - <rustc_target::abi::call::FnType<&rustc::ty::TyS> as rustc_codegen_llvm::abi::FnTypeLlvmExt>::llvm_type::h186eeb827ff60e0d                                                                                                                                                       
  77:     0x7ffdb55fd1ed - rustc_codegen_llvm::declare::<impl rustc_codegen_ssa::traits::declare::DeclareMethods for rustc_codegen_llvm::context::CodegenCx>::declare_fn::heca258954977ec9d                                                                                                                 
  78:     0x7ffdb55fda5c - rustc_codegen_llvm::mono_item::<impl rustc_codegen_ssa::traits::declare::PreDefineMethods for rustc_codegen_llvm::context::CodegenCx>::predefine_fn::h776e0f4c5ac93463                                                                                                           
  79:     0x7ffdb555041c - <rustc_codegen_llvm::back::lto::Linker as core::ops::drop::Drop>::drop::hc825d6ee9a545cf8                                                                                                                                                                                        
  80:     0x7ffdb54ef825 - <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Iterator>::next::ha672766d69e7a305                                                                                                                                                                         
  81:     0x7ffdb554a4b2 - <rustc_codegen_llvm::back::lto::Linker as core::ops::drop::Drop>::drop::hc825d6ee9a545cf8                                                                                                                                                                                        
  82:     0x7ffdb54ef637 - <rustc_codegen_llvm::base::ValueIter as core::iter::traits::iterator::Iterator>::next::ha672766d69e7a305                                                                                                                                                                         
  83:     0x7ffdb564552f - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate::h993ba9d352f4d4fa                                                                                                                                               
  84:     0x7ffdb7f22901 - <humantime::date::Rfc3339Timestamp as core::fmt::Debug>::fmt::hec63be805cad1b01                                                                                                                                                                                                  
  85:     0x7ffdb8021c61 - rustc_interface::passes::BoxedResolver::complete::h3ec528251042c0a7                                                                                                                                                                                                              
  86:     0x7ffdb7f2916e - <humantime::date::Rfc3339Timestamp as core::fmt::Debug>::fmt::hec63be805cad1b01                                                                                                                                                                                                  
  87:     0x7ffdb8020677 - rustc_interface::passes::BoxedResolver::to_expansion_result::h7bfab83d43887bf3                                                                                                                                                                                                   
  88:     0x7ffdb7fbbbce - flate2::gz::GzHeader::extra::hfc44b7a28fcb441b                                                                                                                                                                                                                                   
  89:     0x7ffdb7f43a1a - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen::h929a9c95080f59f6                                                                                                                                                                        
  90:     0x7ffdb7ea4dd6 - <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt::h278baf744d79c069                                                                                                                                                                                           
  91:     0x7ffdb7eb1776 - <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt::h278baf744d79c069                                                                                                                                                                                           
  92:     0x7ffdb7ed3d6f - <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt::h278baf744d79c069                                                                                                                                                                                           
  93:     0x7ffdb7e756f4 - <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt::h278baf744d79c069                                                                                                                                                                                           
  94:     0x7ffdf3429222 - _rust_maybe_catch_panic                                                                                                                                                                                                                                                          
  95:     0x7ffdb7e809b2 - <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt::h278baf744d79c069                                                                                                                                                                                           
  96:     0x7ffdf33f60f7 - ZN244_$LT$std..error..$LT$impl$u20$core..convert..From$LT$alloc..string..String$GT$$u20$for$u20$alloc..boxed..Box$LT$dyn$u20$std..error..Error$u2b$core..marker..Sync$u2b$core..marker..Send$GT$$GT$..from..StringError$u20$as$u20$core..fmt..Display$GT$3fmt17                  
  97:     0x7ffdf3426ae6 - std::sys::windows::thread::Thread::new::h6a5fd2d66eb61031                                                                                                                                                                                                                        
  98:     0x7ffe1f1b6e24 - BaseThreadInitThunk                                                                                                                                                                                                                                                              
  99:     0x7ffe1fadb081 - RtlUserThreadStart                                                                                                                                                                                                                                                               
query stack during panic:              
```                                                                                                                                                                                                                                                                     </p></details>

@rubdos
Copy link

rubdos commented Jul 23, 2019

Also when the type is wrapped privately (i.e., pub struct Keccak1600(KeccakState::<1600usize>)) and exported like that, it seems to be triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-metadata Area: Crate metadata C-bug Category: This is a bug. F-const_generics `#![feature(const_generics)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants