]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/err_expect.fixed
Rollup merge of #100076 - tspiteri:const_slice_split_at, r=oli-obk
[rust.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 }