summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/err_expect.rs
blob: bf8c3c9fb8c98f680adfaeb6a9e9f2fa30fc437a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-rustfix

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");
}