diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-18088.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-18088.rs b/src/test/ui/issues/issue-18088.rs new file mode 100644 index 000000000..c557b5a65 --- /dev/null +++ b/src/test/ui/issues/issue-18088.rs @@ -0,0 +1,8 @@ +// check-pass + +pub trait Indexable<T>: std::ops::Index<usize, Output = T> { + fn index2(&self, i: usize) -> &T { + &self[i] + } +} +fn main() {} |