Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some needless // gate-test- comments #42177

Merged
merged 1 commit into from
May 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

// aux-build:attr_proc_macro.rs
// gate-test-proc_macro
#![feature(use_extern_macros)]

extern crate attr_proc_macro;
Expand All @@ -21,4 +20,4 @@ struct Foo;

fn main() {
let _ = Foo;
}
}
2 changes: 0 additions & 2 deletions src/test/compile-fail/feature-gate-global_asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// gate-test-global_asm

global_asm!(""); //~ ERROR `global_asm!` is not stable

fn main() {}
29 changes: 16 additions & 13 deletions src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub fn check(path: &Path, bad: &mut bool) {
}

let filen_underscore = filename.replace("-","_").replace(".rs","");
test_filen_gate(&filen_underscore, &mut features);
let filename_is_gate_test = test_filen_gate(&filen_underscore, &mut features);

contents.truncate(0);
t!(t!(File::open(&file), &file).read_to_string(&mut contents));
Expand All @@ -92,17 +92,20 @@ pub fn check(path: &Path, bad: &mut bool) {
},
None => continue,
};
let found_feature = features.get_mut(feature_name)
.map(|v| { v.has_gate_test = true; () })
.is_some();

let found_lib_feature = features.get_mut(feature_name)
.map(|v| { v.has_gate_test = true; () })
.is_some();

if !(found_feature || found_lib_feature) {
err(&format!("gate-test test found referencing a nonexistent feature '{}'",
feature_name));
match features.get_mut(feature_name) {
Some(f) => {
if filename_is_gate_test {
err(&format!("The file is already marked as gate test \
through its name, no need for a \
'gate-test-{}' comment",
feature_name));
}
f.has_gate_test = true;
}
None => {
err(&format!("gate-test test found referencing a nonexistent feature '{}'",
feature_name));
}
}
}
});
Expand Down Expand Up @@ -265,4 +268,4 @@ pub fn collect_lib_features(base_src_path: &Path,
}
});
lib_features
}
}