Skip to content

Commit db7ee95

Browse files
committed
compiletest: Derive Default for EarlyProps
1 parent 9a154a9 commit db7ee95

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ enum ParsedNameDirective {
2424

2525
/// Properties which must be known very early, before actually running
2626
/// the test.
27+
#[derive(Default)]
2728
pub struct EarlyProps {
2829
pub ignore: bool,
2930
pub should_fail: bool,
@@ -39,14 +40,7 @@ impl EarlyProps {
3940
}
4041

4142
pub fn from_reader<R: Read>(config: &Config, testfile: &Path, rdr: R) -> Self {
42-
let mut props = EarlyProps {
43-
ignore: false,
44-
should_fail: false,
45-
aux: Vec::new(),
46-
aux_crate: Vec::new(),
47-
revisions: vec![],
48-
};
49-
43+
let mut props = EarlyProps::default();
5044
let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some();
5145
let rustc_has_sanitizer_support = env::var_os("RUSTC_SANITIZER_SUPPORT").is_some();
5246

0 commit comments

Comments
 (0)