Add test for trait check in prelude collision lint.
This commit is contained in:
parent
60535441c8
commit
f77dd5ac93
1 changed files with 16 additions and 1 deletions
|
@ -11,8 +11,23 @@ impl S {
|
|||
}
|
||||
}
|
||||
|
||||
// See https://github.com/rust-lang/rust/issues/86633
|
||||
struct X;
|
||||
|
||||
trait Hey {
|
||||
fn from_iter(_: i32) -> Self;
|
||||
}
|
||||
|
||||
impl Hey for X {
|
||||
fn from_iter(_: i32) -> Self {
|
||||
X
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// See https://github.com/rust-lang/rust/issues/86633
|
||||
let s = S;
|
||||
let s2 = s.try_into();
|
||||
|
||||
// See https://github.com/rust-lang/rust/issues/86902
|
||||
X::from_iter(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue