Repository navigation
ICE: Type parameter out of range when substituting in region 'a (space=FnSpace, index=0) #18232
Copy link
Copy link
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
Unfortunately I've failed to understand what exactly causes it as reported 'a core::NativeTransaction is used just in a couple of places and looks completely innocent.
I believe it started after #18121 landed.
Here is a backtrace:
/Users/vhbit/projects/lmdb-rs/src/lib.rs:1:1: 1:1 error: internal compiler error: Type parameter out of range when substituting in region 'a (root type='acore::NativeTransaction) (space=FnSpace, index=0)
/Users/vhbit/projects/lmdb-rs/src/lib.rs:1 #![crate_name = "lmdb"]
^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /Users/vhbit/projects/auto-rust/src/libsyntax/diagnostic.rs:116
stack backtrace:
1: 0x10f254299 - rt::backtrace::imp::write::h6f68f12355c8d0e2mlq
2: 0x10f257577 - failure::on_fail::he53cd18c9c48fe7cVBq
3: 0x10f4ba675 - unwind::begin_unwind_inner::h532adb3b47d70b2aDud
4: 0x10e9ab687 - unwind::begin_unwind::h13945917757193214155
5: 0x10e9ab620 - unwind::begin_unwind::h13945917757193214155
6: 0x10c2d2c13 - middle::subst::SubstFolder<'a, 'tcx>.TypeFolder<'tcx>::fold_region::hf439d6ca506a1235J8V
7: 0x10c20ab96 - middle::subst::SubstFolder<'a, 'tcx>.TypeFolder<'tcx>::fold_ty::h6b224cbf27a1f8b0PaW
8: 0x10c4aab18 - middle::typeck::check::method::LookupContext<'a, 'tcx>::xform_self_ty::h8b8bf7076e90ad97bdU
9: 0x10c4a96bd - middle::typeck::check::method::LookupContext<'a, 'tcx>::push_inherent_impl_candidates_for_type::h149b1a403c6e9c8d4US
10: 0x10c4a9103 - middle::typeck::check::method::LookupContext<'a, 'tcx>::push_inherent_candidates::closure.130669
11: 0x10c4a8af5 - middle::typeck::check::autoderef::h1138707213401754793
12: 0x10c49f192 - middle::typeck::check::method::lookup::h656fa83e72c76904vGR
13: 0x10c4fdebb - middle::typeck::check::check_expr_with_unifier::ha848438f23402a7dCsY
14: 0x10c4c72e0 - middle::typeck::check::check_block_with_expected::hdc28d4c9d3fea42a0A0
15: 0x10c4c2b44 - middle::typeck::check::check_fn::h84feddd5d2edf884LfV
16: 0x10c4c200b - middle::typeck::check::check_bare_fn::he86fef689e6d9102T4U
17: 0x10c4c9a10 - middle::typeck::check::check_method_body::ha706363df14218ddEzV
18: 0x10c4bee98 - middle::typeck::check::check_item::hf51938155885a1b8UoV
19: 0x10c4c02e3 - visit::walk_item::h11639469492027250940
20: 0x10c4c1e6a - middle::typeck::check::check_item_types::hbb9da7acb2b363e033U
21: 0x10bf87d56 - util::common::time::h17357078438074708411
22: 0x10c79062e - middle::typeck::check_crate::h0ccf9d9f552899b3xLn
23: 0x10c7fbcff - driver::driver::phase_3_run_analysis_passes::h5c7782ef6e7c62e6fpA
24: 0x10c7f6cae - driver::driver::compile_input::h0f5f8287137a89d705z
25: 0x10c87b23f - driver::run_compiler::hef0d18d631a92f7abTD
26: 0x10c8793c6 - driver::run::closure.144873
27: 0x10bfa141b - task::TaskBuilder<S>::try_future::closure.103271
28: 0x10bfa1303 - task::TaskBuilder<S>::spawn_internal::closure.103242
29: 0x10bf1e8fd - task::NativeSpawner.Spawner::spawn::closure.8527
30: 0x10f524b3c - rust_try_inner
31: 0x10f524b26 - rust_try
32: 0x10f4b7ce7 - unwind::try::hf6abc66f61cc4b23ljd
33: 0x10f4b7b6c - task::Task::run::h4e050f8fa3cba51ewzc
34: 0x10bf1e722 - task::NativeSpawner.Spawner::spawn::closure.8466
35: 0x10f4b952a - thread::thread_start::h8fed07902f91253fHTc
36: 0x7fff9406b899 - _pthread_body
37: 0x7fff9406b72a - _pthread_struct_init
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Activity
vhbit commentedon Oct 22, 2014
cc @nikomatsakis
vhbit commentedon Oct 22, 2014
After commenting out everything what somehow uses
NativeTransactionI've gotType parameter out of range when substituting in region 'a (root type='aSelf) (space=FnSpace, index=0)and stopped here as there is too much to comment out if trying to remove all traits.pythonesque commentedon Oct 23, 2014
Having the same issue.
vhbit commentedon Oct 23, 2014
Here is so far smallest piece of code which causes it:
vhbit commentedon Oct 23, 2014
So it seems the only thing which crashes it is a notion that
'boutlives'a, if'bis declared to be independent it has a problem compiling it.Unfortunately there is no workaround it my case as if I remove this obligation I get compile errors in other parts.
vhbit commentedon Oct 24, 2014
@nikomatsakis is there anything else I can provide to help fixing it?
nikomatsakis commentedon Oct 30, 2014
Sorry, catching up on github notifications and only just saw this.
nikomatsakis commentedon Oct 30, 2014
The reduced test case certainly helps a lot.
IvanUkhov commentedon Nov 2, 2014
Hello,
I get a similar error
with the following code:
I hope it helps.
Regards,
Ivan
vhbit commentedon Nov 6, 2014
@nikomatsakis any estimations on this issue? There is a tons of useful stuff in nightly and it is a bit pity to stay on 2 week old version just because one of deps produced ICE.
nikomatsakis commentedon Nov 6, 2014
On Thu, Nov 06, 2014 at 01:04:45AM -0800, Valerii Hiora wrote:
Hi, sorry, I've been busy pushing on new features, I plan to take some
time to investigate bugs (including this one).
nikomatsakis commentedon Nov 6, 2014
OK, so, I figured out the fix. I will attach a patch on this pending PR: #18694
vhbit commentedon Nov 7, 2014
ohh, it finally works! 👍
rollup merge of rust-lang#19780: jakub-/e-needstest
rollup merge of rust-lang#19780: jakub-/e-needstest