Skip to content

Commit 78cff68

Browse files
committed
move tests
1 parent c5db75e commit 78cff68

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/test/ui/error-trait/error-in-panic.rs renamed to tests/ui/errors/issue-103169-error-in-panic.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
extern crate core;
1010

11-
use core::panicking::panic_source;
1211
use core::error;
12+
use core::panicking::panic_source;
1313

1414
use std::error::Error;
1515

16-
#[derive (Debug)]
16+
#[derive(Debug)]
1717
struct MyErr {
1818
super_source: SourceError,
1919
}
2020

21-
#[derive (Debug)]
21+
#[derive(Debug)]
2222
struct SourceError {}
2323

2424
use std::fmt;
@@ -29,7 +29,7 @@ impl fmt::Display for MyErr {
2929
}
3030

3131
impl error::Error for MyErr {
32-
fn source(&self) -> Option<& (dyn Error + 'static)> {
32+
fn source(&self) -> Option<&(dyn Error + 'static)> {
3333
Some(&self.super_source)
3434
}
3535
}
@@ -40,12 +40,10 @@ impl fmt::Display for SourceError {
4040
}
4141
}
4242

43-
impl error::Error for SourceError {
44-
45-
}
43+
impl error::Error for SourceError {}
4644

4745
fn main() {
4846
let source_error = SourceError {};
49-
let source = MyErr {super_source: source_error};
47+
let source = MyErr { super_source: source_error };
5048
panic_source(format_args!("here's my panic error message"), &source);
5149
}

0 commit comments

Comments
 (0)