From ca376049ca8204fa51c36dc7d4bf4991e972660c Mon Sep 17 00:00:00 2001 From: "Zack M. Davis" Date: Fri, 16 Dec 2016 17:45:59 -0800 Subject: [PATCH] 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. --- src/tools/tidy/src/features.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 4ef07f7e4b896..ac5dff0980c08 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| {