// check-pass #![crate_type = "lib"] // In an older version, when NLL was still a feature, the following previously did not compile use std::ops::Index; pub struct Test { a: T, } impl Index for Test { type Output = T; fn index(&self, _index: usize) -> &Self::Output { &self.a } }