rust/tests/ui/issues/issue-18088.rs
2023-01-11 09:32:08 +00: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() {}