Skip to content

Commit f77dd5a

Browse files
committed
Add test for trait check in prelude collision lint.
1 parent 6053544 commit f77dd5a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/test/ui/rust-2021/future-prelude-collision-unneeded.rs

+16-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,23 @@ impl S {
1111
}
1212
}
1313

14-
// See https://github.com/rust-lang/rust/issues/86633
14+
struct X;
15+
16+
trait Hey {
17+
fn from_iter(_: i32) -> Self;
18+
}
19+
20+
impl Hey for X {
21+
fn from_iter(_: i32) -> Self {
22+
X
23+
}
24+
}
25+
1526
fn main() {
27+
// See https://github.com/rust-lang/rust/issues/86633
1628
let s = S;
1729
let s2 = s.try_into();
30+
31+
// See https://github.com/rust-lang/rust/issues/86902
32+
X::from_iter(1);
1833
}

0 commit comments

Comments
 (0)