2023-04-23 06:03:09 -05:00
|
|
|
//@run-rustfix
|
2022-04-07 12:39:59 -05:00
|
|
|
|
2022-10-23 08:18:45 -05:00
|
|
|
#![allow(unused)]
|
|
|
|
|
2022-04-07 12:39:59 -05:00
|
|
|
struct MyTypeNonDebug;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
struct MyTypeDebug;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let test_debug: Result<MyTypeDebug, u32> = Ok(MyTypeDebug);
|
|
|
|
test_debug.err().expect("Testing debug type");
|
|
|
|
|
|
|
|
let test_non_debug: Result<MyTypeNonDebug, u32> = Ok(MyTypeNonDebug);
|
|
|
|
test_non_debug.err().expect("Testing non debug type");
|
|
|
|
}
|
2022-10-23 08:18:45 -05:00
|
|
|
|
2022-12-01 11:29:38 -06:00
|
|
|
#[clippy::msrv = "1.16"]
|
2022-10-23 08:18:45 -05:00
|
|
|
fn msrv_1_16() {
|
|
|
|
let x: Result<u32, &str> = Ok(16);
|
|
|
|
x.err().expect("16");
|
|
|
|
}
|
|
|
|
|
2022-12-01 11:29:38 -06:00
|
|
|
#[clippy::msrv = "1.17"]
|
2022-10-23 08:18:45 -05:00
|
|
|
fn msrv_1_17() {
|
|
|
|
let x: Result<u32, &str> = Ok(17);
|
|
|
|
x.err().expect("17");
|
|
|
|
}
|