]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/err_expect.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / tools / clippy / tests / ui / err_expect.rs
1 // run-rustfix
2
3 struct MyTypeNonDebug;
4
5 #[derive(Debug)]
6 struct MyTypeDebug;
7
8 fn main() {
9     let test_debug: Result<MyTypeDebug, u32> = Ok(MyTypeDebug);
10     test_debug.err().expect("Testing debug type");
11
12     let test_non_debug: Result<MyTypeNonDebug, u32> = Ok(MyTypeNonDebug);
13     test_non_debug.err().expect("Testing non debug type");
14 }