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

19 lines
266 B
Rust
Raw Normal View History

// edition:2018
// check-pass
#![allow(unused)]
#![deny(rust_2021_prelude_collisions)]
struct S;
impl S {
2021-06-29 16:53:44 +02:00
fn try_into(self) -> S {
S
}
}
// See https://github.com/rust-lang/rust/issues/86633
fn main() {
let s = S;
let s2 = s.try_into();
}