summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-18088.rs
blob: c557b5a6512b997c132bc9666b7db132ad777c71 (plain)
1
2
3
4
5
6
7
8
// check-pass

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