Skip to content

Commit 813af34

Browse files
authored
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.
2 parents 4b5cffc + ca37604 commit 813af34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/tidy/src/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn check(path: &Path, bad: &mut bool) {
6767
}
6868

6969
contents.truncate(0);
70-
t!(t!(File::open(file)).read_to_string(&mut contents));
70+
t!(t!(File::open(&file), &file).read_to_string(&mut contents));
7171

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

0 commit comments

Comments
 (0)