Skip to content

Commit 68f5df6

Browse files
committed
---
yaml --- r: 275900 b: refs/heads/borrowck-snippet c: 125baf1 h: refs/heads/master
1 parent da86a33 commit 68f5df6

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ refs/tags/1.5.0: d8027afc009e55fb07776831094a13b1b64b6305
3939
refs/tags/1.6.0: 4fe6048e8dd100ec1c61a020d01f75046b42e818
4040
refs/tags/1.7.0: 2d2a9311cbe05eb47960489259e1e9408062c863
4141
refs/tags/1.8.0: 6bef00072dbaa86da9dc73b09f926cf67c696b39
42-
refs/heads/borrowck-snippet: d1038dabc3ca0522035871c12fc46121a92e4028
42+
refs/heads/borrowck-snippet: 125baf11a1c34b9b8e9594a0e1384013994c8087

branches/borrowck-snippet/src/tools/tidy/src/bins.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn check(path: &Path, bad: &mut bool) {
3535
return
3636
}
3737

38-
let metadata = t!(fs::metadata(&file));
38+
let metadata = t!(fs::metadata(&file), &file);
3939
if metadata.mode() & 0o111 != 0 {
4040
println!("binary checked into source: {}", file.display());
4141
*bad = true;

branches/borrowck-snippet/src/tools/tidy/src/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::fs::File;
2020
use std::path::Path;
2121

2222
pub fn check(path: &Path, bad: &mut bool) {
23-
for entry in t!(path.read_dir()).map(|e| t!(e)) {
23+
for entry in t!(path.read_dir(), path).map(|e| t!(e)) {
2424
// Look for `Cargo.toml` with a sibling `src/lib.rs` or `lib.rs`
2525
if entry.file_name().to_str() == Some("Cargo.toml") {
2626
if path.join("src/lib.rs").is_file() {

branches/borrowck-snippet/src/tools/tidy/src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ use std::path::{PathBuf, Path};
1919
use std::env;
2020

2121
macro_rules! t {
22+
($e:expr, $p:expr) => (match $e {
23+
Ok(e) => e,
24+
Err(e) => panic!("{} failed on {} with {}", stringify!($e), ($p).display(), e),
25+
});
26+
2227
($e:expr) => (match $e {
2328
Ok(e) => e,
2429
Err(e) => panic!("{} failed with {}", stringify!($e), e),
@@ -63,7 +68,7 @@ fn filter_dirs(path: &Path) -> bool {
6368

6469

6570
fn walk(path: &Path, skip: &mut FnMut(&Path) -> bool, f: &mut FnMut(&Path)) {
66-
for entry in t!(fs::read_dir(path)) {
71+
for entry in t!(fs::read_dir(path), path) {
6772
let entry = t!(entry);
6873
let kind = t!(entry.file_type());
6974
let path = entry.path();

branches/borrowck-snippet/src/tools/tidy/src/style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn check(path: &Path, bad: &mut bool) {
5252
}
5353

5454
contents.truncate(0);
55-
t!(t!(File::open(file)).read_to_string(&mut contents));
55+
t!(t!(File::open(file), file).read_to_string(&mut contents));
5656
let skip_cr = contents.contains("ignore-tidy-cr");
5757
let skip_tab = contents.contains("ignore-tidy-tab");
5858
let skip_length = contents.contains("ignore-tidy-linelength");

0 commit comments

Comments
 (0)