2023-11-10 10:11:24 +08:00
|
|
|
//@ check-pass
|
|
|
|
//@ edition:2021
|
|
|
|
#![warn(unused_imports)]
|
|
|
|
|
2024-04-11 13:32:17 -04:00
|
|
|
use std::convert::TryFrom;
|
|
|
|
//FIXME(unused_imports): ~^ WARNING the item `TryFrom` is imported redundantly
|
|
|
|
use std::convert::TryInto;
|
|
|
|
//FIXME(unused_imports): ~^ WARNING the item `TryInto` is imported redundantly
|
2023-11-10 10:11:24 +08:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _e: Result<i32, _> = 8u8.try_into();
|
|
|
|
let _f: Result<i32, _> = i32::try_from(8u8);
|
|
|
|
}
|