diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2016-12-19 16:59:40 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-19 16:59:40 +0900 |
| commit | 813af34c9252ce8898f1ff7bebbc1ebbe3e90571 (patch) | |
| tree | 2fa806154dce202fc05ecacc8181a2dd82d83b9f | |
| parent | 4b5cffc04b526d9d9f94e07f0fecb24a22595f00 (diff) | |
| parent | ca376049ca8204fa51c36dc7d4bf4991e972660c (diff) | |
| download | rust-813af34c9252ce8898f1ff7bebbc1ebbe3e90571.tar.gz rust-813af34c9252ce8898f1ff7bebbc1ebbe3e90571.zip | |
Rollup merge of #38422 - zackmdavis:enjoy_tidy_path_error_macro_nicety, r=bluss
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. Resolves #38417.
| -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| { |
