]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/err_expect.rs
Rollup merge of #102412 - joboet:dont_panic, r=m-ou-se
[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 }