diff options
| author | Zack M. Davis <code@zackmdavis.net> | 2016-12-16 17:45:59 -0800 |
|---|---|---|
| committer | Zack M. Davis <code@zackmdavis.net> | 2016-12-16 17:45:59 -0800 |
| commit | ca376049ca8204fa51c36dc7d4bf4991e972660c (patch) | |
| tree | 77a04c90b0bb8462494c99456a2c81033b507ba8 /src | |
| parent | d250169cb5a96481a3e7c8f9fe05de49f60e5ae5 (diff) | |
| download | rust-ca376049ca8204fa51c36dc7d4bf4991e972660c.tar.gz rust-ca376049ca8204fa51c36dc7d4bf4991e972660c.zip | |
tidy features: use 2-parameter form of internal try macro for open err
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 #38417.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/tidy/src/features.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 4ef07f7e4b8..ac5dff0980c 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -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| { |
