From db7ee9534522196a9e750833c0303d8275c683bc Mon Sep 17 00:00:00 2001 From: Tomasz Miąsko Date: Mon, 27 Jan 2020 00:00:00 +0000 Subject: compiletest: Derive Default for EarlyProps --- src/tools/compiletest/src/header.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/tools') diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 029afd1b38f..684e19f99b5 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -24,6 +24,7 @@ enum ParsedNameDirective { /// Properties which must be known very early, before actually running /// the test. +#[derive(Default)] pub struct EarlyProps { pub ignore: bool, pub should_fail: bool, @@ -39,14 +40,7 @@ impl EarlyProps { } pub fn from_reader(config: &Config, testfile: &Path, rdr: R) -> Self { - let mut props = EarlyProps { - ignore: false, - should_fail: false, - aux: Vec::new(), - aux_crate: Vec::new(), - revisions: vec![], - }; - + let mut props = EarlyProps::default(); let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some(); let rustc_has_sanitizer_support = env::var_os("RUSTC_SANITIZER_SUPPORT").is_some(); -- cgit 1.4.1-3-g733a5