You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! The following code snippet utilizing impl Trait and lifetime elision fails to compile (resulting in a ICE) on the latest nightly, as well as nightlies stretching back to (at least) 2017/08/02. If I explicitly specify the lifetimes, I don't get the ICE.
// lib.rs
#![feature(conservative_impl_trait)]
use std::collections::BTreeMap;
pub struct Wrapper<T> {
map: BTreeMap<T, T>
}
impl<T> Wrapper<T> {
pub fn iter(&self) -> impl Iterator<Item = &T> {
self.block.iter() // notice that there is no field named block. The same error happens even when using self.map
}
}
Hi! The following code snippet utilizing
impl Trait
and lifetime elision fails to compile (resulting in a ICE) on the latest nightly, as well as nightlies stretching back to (at least) 2017/08/02. If I explicitly specify the lifetimes, I don't get the ICE.I get the following error:
The backtrace is:
The text was updated successfully, but these errors were encountered: