summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/err_expect.fixed
blob: 7e18d70bae4007313c76d384005d255fd921a2d9 (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.expect_err("Testing debug type");

    let test_non_debug: Result<MyTypeNonDebug, u32> = Ok(MyTypeNonDebug);
    test_non_debug.err().expect("Testing non debug type");
}