rust/src/test/ui/issues/issue-18088.rs
2019-11-04 16:03:46 +01:00

9 lines
153 B
Rust

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