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