]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/err_expect.fixed
New upstream version 1.62.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / err_expect.fixed
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.expect_err("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 }