Skip to content

Commit 8ee3a08

Browse files
committed
clean up issue-18088 (operator from supertrait)
1 parent 05a5c7d commit 8ee3a08

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

tests/ui/issues/issue-18088.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ check-pass
2+
3+
//! Tests that operators from supertrait are available directly on `self` for an inheritor trait.
4+
//!
5+
//! # Context
6+
//! Original issue: https://github.com/rust-lang/rust/issues/18088
7+
8+
pub trait Indexable<T>: std::ops::Index<usize, Output = T> {
9+
fn index2(&self, i: usize) -> &T {
10+
&self[i]
11+
}
12+
}
13+
fn main() {}

0 commit comments

Comments
 (0)