summary refs log tree commit diff
path: root/src/test/ui/issues/issue-18088.rs
blob: 67000d9a6ec3f5dd0f4583c8c93aef3a86e4bc34 (plain)
1
2
3
4
5
6
7
8
// compile-pass

pub trait Indexable<T>: std::ops::Index<usize, Output = T> {
    fn index2(&self, i: usize) -> &T {
        &self[i]
    }
}
fn main() {}