about summary refs log tree commit diff
path: root/tests/run-make/rustdoc-error-lines
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-05-29 15:01:33 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-31 21:30:08 +1000
commit3079bd96b94fda7acba3161bd53719576224a210 (patch)
tree68b926486007d27b18a48b3e422926918bbcabee /tests/run-make/rustdoc-error-lines
parent70bc0c5b204375e3efe1572689356bf99a9f4e9d (diff)
Run rustfmt on `tests/run-make/`.
With the exception of `tests/run-make/translation/test.rs`, which has a
syntax error.

The expected output in `rustdoc-error-lines/rmake.rs`'s required slight
tweaking.

The two `reproducible-build.rs` files need `// ignore-tidy-linelength`
because rustfmt produces lines longer than 100 chars, which tidy doesn't
like, yuk.
Diffstat (limited to 'tests/run-make/rustdoc-error-lines')
-rw-r--r--tests/run-make/rustdoc-error-lines/input.rs4
-rw-r--r--tests/run-make/rustdoc-error-lines/rmake.rs8
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/run-make/rustdoc-error-lines/input.rs b/tests/run-make/rustdoc-error-lines/input.rs
index b4db182e85f..1ca2efc0dd5 100644
--- a/tests/run-make/rustdoc-error-lines/input.rs
+++ b/tests/run-make/rustdoc-error-lines/input.rs
@@ -6,9 +6,7 @@
 /// #![feature(bool_to_option)]
 /// let x: char = 1;
 /// ```
-pub fn foo() {
-
-}
+pub fn foo() {}
 
 /// Add some text around the test...
 ///
diff --git a/tests/run-make/rustdoc-error-lines/rmake.rs b/tests/run-make/rustdoc-error-lines/rmake.rs
index 31536c78dd4..db6e28e4feb 100644
--- a/tests/run-make/rustdoc-error-lines/rmake.rs
+++ b/tests/run-make/rustdoc-error-lines/rmake.rs
@@ -11,10 +11,10 @@ fn main() {
     let should_contain = &[
         "input.rs - foo (line 5)",
         "input.rs:7:15",
-        "input.rs - bar (line 15)",
-        "input.rs:17:15",
-        "input.rs - bar (line 24)",
-        "input.rs:26:15",
+        "input.rs - bar (line 13)",
+        "input.rs:15:15",
+        "input.rs - bar (line 22)",
+        "input.rs:24:15",
     ];
     for text in should_contain {
         assert!(output.contains(text), "output doesn't contains {:?}", text);