diff options
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/tests/tidy-tests/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xtask/tests/tidy-tests/main.rs b/xtask/tests/tidy-tests/main.rs index 4f525fcd0..b3d6ddac9 100644 --- a/xtask/tests/tidy-tests/main.rs +++ b/xtask/tests/tidy-tests/main.rs | |||
@@ -34,7 +34,7 @@ fn check_todo(path: &Path, text: &str) { | |||
34 | } | 34 | } |
35 | if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") { | 35 | if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") { |
36 | panic!( | 36 | panic!( |
37 | "\nTODO markers should not be committed to the master branch,\n\ | 37 | "\nTODO markers or todo! macros should not be committed to the master branch,\n\ |
38 | use FIXME instead\n\ | 38 | use FIXME instead\n\ |
39 | {}\n", | 39 | {}\n", |
40 | path.display(), | 40 | path.display(), |
@@ -46,9 +46,9 @@ fn check_trailing_ws(path: &Path, text: &str) { | |||
46 | if is_exclude_dir(path, &["test_data"]) { | 46 | if is_exclude_dir(path, &["test_data"]) { |
47 | return; | 47 | return; |
48 | } | 48 | } |
49 | for line in text.lines() { | 49 | for (line_number, line) in text.lines().enumerate() { |
50 | if line.chars().last().map(char::is_whitespace) == Some(true) { | 50 | if line.chars().last().map(char::is_whitespace) == Some(true) { |
51 | panic!("Trailing whitespace in {}", path.display()) | 51 | panic!("Trailing whitespace in {} at line {}", path.display(), line_number) |
52 | } | 52 | } |
53 | } | 53 | } |
54 | } | 54 | } |