]>
Commit | Line | Data |
---|---|---|
04454e1e FG |
1 | // run-rustfix |
2 | ||
2b03887a FG |
3 | #![allow(unused)] |
4 | ||
04454e1e FG |
5 | struct MyTypeNonDebug; |
6 | ||
7 | #[derive(Debug)] | |
8 | struct MyTypeDebug; | |
9 | ||
10 | fn main() { | |
11 | let test_debug: Result<MyTypeDebug, u32> = Ok(MyTypeDebug); | |
12 | test_debug.err().expect("Testing debug type"); | |
13 | ||
14 | let test_non_debug: Result<MyTypeNonDebug, u32> = Ok(MyTypeNonDebug); | |
15 | test_non_debug.err().expect("Testing non debug type"); | |
16 | } | |
2b03887a | 17 | |
487cf647 | 18 | #[clippy::msrv = "1.16"] |
2b03887a | 19 | fn msrv_1_16() { |
2b03887a FG |
20 | let x: Result<u32, &str> = Ok(16); |
21 | x.err().expect("16"); | |
22 | } | |
23 | ||
487cf647 | 24 | #[clippy::msrv = "1.17"] |
2b03887a | 25 | fn msrv_1_17() { |
2b03887a FG |
26 | let x: Result<u32, &str> = Ok(17); |
27 | x.err().expect("17"); | |
28 | } |