Skip to content

Commit

Permalink
tidy features: use 2-parameter form of internal try macro for open err
Browse files Browse the repository at this point in the history
This tiny patch merely applies @bluss's suggestion for how to get a more
informative error message when the feature check can't open a file, a
matter that had briefly annoyed the present author, leading to the
filing of rust-lang#38417.
  • Loading branch information
zackmdavis committed Dec 17, 2016
1 parent d250169 commit ca37604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/tidy/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn check(path: &Path, bad: &mut bool) {
}

contents.truncate(0);
t!(t!(File::open(file)).read_to_string(&mut contents));
t!(t!(File::open(&file), &file).read_to_string(&mut contents));

for (i, line) in contents.lines().enumerate() {
let mut err = |msg: &str| {
Expand Down

0 comments on commit ca37604

Please sign in to comment.