Closed
Description
#[inline(always)]
pub fn changed_iter(&self) -> impl Iterator<Item = &(ParamSelector, CtrlVal)> {
self.changed_last_frame.iter()
}
error: internal compiler error: src\state.rs:31: src\librustc_typeck\check\mod.rs:631: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: Slice([_]), item_def_id: DefId { krate: CrateNum(2), node: DefIndex(0:1649) => core/51d3956::iter[0]::iterator[0]::Iterator[0]::Item[0] } }, &(param::ParamSelector, f32))),depth=0)
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.22.0-nightly (325ba23d5 2017-09-19) running on x86_64-pc-windows-msvc
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:439:8
stack backtrace:
0: _rdl_shrink_in_place
1: std::panicking::Location::column
2: std::panicking::Location::column
3: std::panicking::rust_panic_with_hook
4: <unknown>
5: <unknown>
6: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::nested_visit_map
7: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::nested_visit_map
8: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as core::ops::deref::Deref>::deref
9: <unknown>
10: <rustc_typeck::check::GatherLocalsVisitor<'a, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_pat
11: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
12: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
13: rustc::dep_graph::graph::DepGraph::in_ignore
14: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
15: rustc::ty::maps::TyCtxtAt::typeck_tables_of
16: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
17: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
18: rustc::dep_graph::graph::DepGraph::in_ignore
19: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
20: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
21: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
22: rustc_typeck::check_crate
23: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
24: rustc_driver::driver::compile_input
25: rustc_driver::run_compiler
26: <unknown>
27: _rust_maybe_catch_panic
28: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
29: std::sys::imp::thread::Thread::new
30: BaseThreadInitThunk
(When I remove the '&' from Item, it gives the error "expected reference".)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Boscop commentedon Oct 1, 2017
Playground example:
https://play.rust-lang.org/?gist=13f577938a298670ba77217c3ba77286&version=nightly
cramertj commentedon Oct 10, 2017
impl Trait
doesn't work (and isn't supposed to work) with elided lifetimes. Of course, we should display a real error instead of ICEing, but that's the problem here. It will work if you make the lifetimes explicit.kennytm commentedon Oct 10, 2017
Duplicate of #42479 / #43396.
pietroalbini commentedon Apr 3, 2018
This is now fixed. Closing this.