Closed
Description
Minimal test case:
#![feature(unboxed_closures)]
struct A<'a> {
val: &'a int
}
enum X {
Y(Box<FnOnce(A) -> () + Send>)
}
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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' panicked at 'assertion failed: !substs.has_regions_escaping_depth(0)', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/middle/typeck/check/mod.rs:2109
stack backtrace:
1: 0x7fd03cf4ef90 - rt::backtrace::imp::write::hef97d2b7b4481e2fW6s
2: 0x7fd03cf52060 - failure::on_fail::h9b598fcb939318f7Bxt
3: 0x7fd03cbb1670 - unwind::begin_unwind_inner::hf72462897f10dfac4ad
4: 0x7fd03b764b80 - unwind::begin_unwind::h18402204983521630185
5: 0x7fd03bb512d0 - middle::typeck::check::FnCtxt<'a, 'tcx>::add_trait_obligations_for_generics::h5d0b978643006544njl
6: 0x7fd03bb4f8f0 - middle::typeck::check::wf::BoundsChecker<'cx, 'tcx>.TypeFolder<'tcx>::fold_ty::hca149489e5d69a8btQh
7: 0x7fd03ba59430 - vec::Vec<T>.FromIterator<T>::from_iter::h14318962915192687915
8: 0x7fd03bb539c0 - middle::ty_fold::super_fold_sty::h12970736008578661148
9: 0x7fd03bb4f8f0 - middle::typeck::check::wf::BoundsChecker<'cx, 'tcx>.TypeFolder<'tcx>::fold_ty::hca149489e5d69a8btQh
10: 0x7fd03bb538a0 - middle::ty_fold::VecPerParamSpace<T>.TypeFoldable<'tcx>::fold_with::closure.107305
11: 0x7fd03ba58f80 - middle::subst::VecPerParamSpace<T>::map_enumerated::h13858992608945859188
12: 0x7fd03bb535c0 - middle::ty_fold::TypeFolder::fold_substs::h13915338047366102487
13: 0x7fd03bb539c0 - middle::ty_fold::super_fold_sty::h12970736008578661148
14: 0x7fd03bb4f8f0 - middle::typeck::check::wf::BoundsChecker<'cx, 'tcx>.TypeFolder<'tcx>::fold_ty::hca149489e5d69a8btQh
15: 0x7fd03bb539c0 - middle::ty_fold::super_fold_sty::h12970736008578661148
16: 0x7fd03bb4f8f0 - middle::typeck::check::wf::BoundsChecker<'cx, 'tcx>.TypeFolder<'tcx>::fold_ty::hca149489e5d69a8btQh
17: 0x7fd03bb4b0b0 - middle::typeck::check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::check_type_defn::closure.107075
18: 0x7fd03bb48be0 - middle::typeck::check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>::with_fcx::h58aaf089e5fd2e9bvCh
19: 0x7fd03bb4dd50 - middle::typeck::check::wf::CheckTypeWellFormedVisitor<'ccx, 'tcx>.Visitor<'v>::visit_item::h2cf8a83e75805833KMh
20: 0x7fd03bba2c30 - middle::typeck::check::check_item_types::h194caebf769e20cbtOi
21: 0x7fd03bf46650 - util::common::time::h4022043216362661590
22: 0x7fd03bf45860 - middle::typeck::check_crate::h23e3f0edbff8b71ecwM
23: 0x7fd03d4e5840 - driver::driver::phase_3_run_analysis_passes::hc4c79fc604c5886b2eS
24: 0x7fd03d4da710 - driver::driver::compile_input::hac264b2ee6a5298a8VR
25: 0x7fd03d55eee0 - driver::run_compiler::haa8f6fb10b50e123gUT
26: 0x7fd03d55edd0 - driver::run::closure.59673
27: 0x7fd03d36bdc0 - task::TaskBuilder::try_future::closure.38928
28: 0x7fd03cedcf30 - task::TaskBuilder::spawn_internal::closure.24286
29: 0x7fd03cbaf130 - task::Task::spawn::closure.6102
30: 0x7fd03cc09590 - rust_try_inner
31: 0x7fd03cc09580 - rust_try
32: 0x7fd03cbaf210 - unwind::try::h7e59352c5994e9d5pZc
33: 0x7fd03cbaefd0 - task::Task::run::hf30215495b09adaey6b
34: 0x7fd03cbaebc0 - task::Task::spawn::closure.6078
35: 0x7fd03cbb0970 - thread::thread_start::ha9152079db62ba4dlqc
36: 0x7fd03769d0c0 - start_thread
37: 0x7fd03c875f89 - __clone
38: 0x0 - <unknown>
rustc fac5a0767 2014-11-26 22:37:06 +0000
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
bkoropoff commentedon Dec 15, 2014
I can't reproduce this, even adding a main function that constructs an instance of
X
tomaka commentedon Dec 15, 2014
It ICEs with
ffc111889 2014-12-12 21:07:19 +0000
on windows (the latest nightlies). Maybe it's been fixed since then.tomaka commentedon Dec 15, 2014
Fixed in today's nightly. Thanks!
Merge pull request rust-lang#19374 from lnicola/nextest