diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 245deda50d5..7405705dd33 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -1905,7 +1905,7 @@ fn emit_suggestion_default( // // LL | this line was highlighted // LL | this line is just for context - // ... + // ... // LL | this line is just for context // LL | this line was highlighted _ => { @@ -1926,7 +1926,7 @@ fn emit_suggestion_default( ) } - buffer.puts(row_num, max_line_num_len - 1, "...", Style::LineNumber); + buffer.puts(row_num, 0, "...", Style::LineNumber); row_num += 1; if let Some((p, l)) = last_line { diff --git a/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr b/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr index 73255651abe..b15857c325a 100644 --- a/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr +++ b/src/tools/clippy/tests/ui/bind_instead_of_map_multipart.stderr @@ -62,7 +62,7 @@ LL | } LL | match s.len() { LL ~ 10 => 2, LL | 20 => { - ... +... LL | if foo() { LL ~ return 20; LL | } diff --git a/src/tools/clippy/tests/ui/needless_collect_indirect.stderr b/src/tools/clippy/tests/ui/needless_collect_indirect.stderr index 0cce718a1ac..f25c0293754 100644 --- a/src/tools/clippy/tests/ui/needless_collect_indirect.stderr +++ b/src/tools/clippy/tests/ui/needless_collect_indirect.stderr @@ -212,7 +212,7 @@ help: check if the original Iterator contains an element instead of collecting t | LL ~ LL | - ... +... LL | // Do lint LL ~ vec.iter().map(|k| k * k).any(|x| x == n); | diff --git a/src/tools/clippy/tests/ui/needless_late_init.stderr b/src/tools/clippy/tests/ui/needless_late_init.stderr index ce64861fa40..de048091cfb 100644 --- a/src/tools/clippy/tests/ui/needless_late_init.stderr +++ b/src/tools/clippy/tests/ui/needless_late_init.stderr @@ -215,7 +215,7 @@ help: move the declaration `x` here | LL ~ LL | // types that should be considered insignificant - ... +... LL | let y = Box::new(4); LL ~ let x = SignificantDrop; | diff --git a/src/tools/clippy/tests/ui/needless_return.stderr b/src/tools/clippy/tests/ui/needless_return.stderr index bf5a89d8b75..b49f199ba5a 100644 --- a/src/tools/clippy/tests/ui/needless_return.stderr +++ b/src/tools/clippy/tests/ui/needless_return.stderr @@ -518,7 +518,7 @@ help: remove `return` | LL ~ 10 LL | }, - ... +... LL | }, LL ~ } | diff --git a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr index 856ec4a5b9e..fdcada468e0 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr +++ b/tests/ui/closures/2229_closure_analysis/migrations/auto_traits.stderr @@ -17,7 +17,7 @@ help: add a dummy let to cause `fptr` to be fully captured | LL ~ thread::spawn(move || { let _ = &fptr; unsafe { LL | - ... +... LL | LL ~ } }).join().unwrap(); | @@ -39,7 +39,7 @@ help: add a dummy let to cause `fptr` to be fully captured | LL ~ thread::spawn(move || { let _ = &fptr; unsafe { LL | - ... +... LL | LL ~ } }).join().unwrap(); | diff --git a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr index 344bc662ee7..138778ff5d7 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr +++ b/tests/ui/closures/2229_closure_analysis/migrations/multi_diagnostics.stderr @@ -109,7 +109,7 @@ help: add a dummy let to cause `fptr1`, `fptr2` to be fully captured | LL ~ thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe { LL | - ... +... LL | LL ~ } }).join().unwrap(); | diff --git a/tests/ui/imports/issue-59764.stderr b/tests/ui/imports/issue-59764.stderr index 293c2a60d80..74525c9c88f 100644 --- a/tests/ui/imports/issue-59764.stderr +++ b/tests/ui/imports/issue-59764.stderr @@ -209,7 +209,7 @@ help: a macro with this name exists at the root of the crate | LL ~ issue_59764::{makro as foobar, LL | - ... +... LL | LL ~ foo::{baz} | diff --git a/tests/ui/issues/issue-22644.stderr b/tests/ui/issues/issue-22644.stderr index 7d8a0ff170a..c6d41cc856d 100644 --- a/tests/ui/issues/issue-22644.stderr +++ b/tests/ui/issues/issue-22644.stderr @@ -64,7 +64,7 @@ help: try comparing the cast value | LL ~ println!("{}", (a LL | - ... +... LL | LL ~ usize) | diff --git a/tests/ui/issues/issue-57271.stderr b/tests/ui/issues/issue-57271.stderr index 10cbb34ef5d..a61419c61d7 100644 --- a/tests/ui/issues/issue-57271.stderr +++ b/tests/ui/issues/issue-57271.stderr @@ -17,7 +17,7 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL ~ Array(Box), LL | TypeVariable(()), - ... +... LL | Base(BaseType), LL ~ Object(Box), | diff --git a/tests/ui/let-else/let-else-if.stderr b/tests/ui/let-else/let-else-if.stderr index c8058ec6692..7e2215c8c05 100644 --- a/tests/ui/let-else/let-else-if.stderr +++ b/tests/ui/let-else/let-else-if.stderr @@ -8,7 +8,7 @@ help: try placing this code inside a block | LL ~ let Some(_) = Some(()) else { if true { LL | - ... +... LL | return; LL ~ } }; | diff --git a/tests/ui/loops/loop-else-break-with-value.stderr b/tests/ui/loops/loop-else-break-with-value.stderr index 13d4c5faf73..ca18f0fdd7f 100644 --- a/tests/ui/loops/loop-else-break-with-value.stderr +++ b/tests/ui/loops/loop-else-break-with-value.stderr @@ -27,7 +27,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched | LL ~ if let Some(1) = loop { LL | - ... +... LL | return; LL ~ } { todo!() }; | diff --git a/tests/ui/moves/nested-loop-moved-value-wrong-continue.stderr b/tests/ui/moves/nested-loop-moved-value-wrong-continue.stderr index 3247513d42c..cf863ff8af1 100644 --- a/tests/ui/moves/nested-loop-moved-value-wrong-continue.stderr +++ b/tests/ui/moves/nested-loop-moved-value-wrong-continue.stderr @@ -26,7 +26,7 @@ help: consider moving the expression out of the loop so it is only moved once LL ~ for foo in foos { let mut value = baz.push(foo); LL ~ for bar in &bars { if foo == *bar { LL | - ... +... LL | LL ~ value; | @@ -69,7 +69,7 @@ help: consider moving the expression out of the loop so it is only moved once LL ~ let mut value = baz.push(foo); LL ~ for bar in &bars { LL | - ... +... LL | if foo == *bar { LL ~ value; | diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr b/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr index d66ce695090..c8107997c2e 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.stderr @@ -54,7 +54,7 @@ help: consider enclosing expression in a block | LL ~ let _i = 'label: { match x { LL | 0 => 42, - ... +... LL | _ => 1, LL ~ } }; | diff --git a/tests/ui/span/recursive-type-field.stderr b/tests/ui/span/recursive-type-field.stderr index 30ba8cde463..323bbd89457 100644 --- a/tests/ui/span/recursive-type-field.stderr +++ b/tests/ui/span/recursive-type-field.stderr @@ -17,7 +17,7 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | LL ~ bar: Box>, LL | b: Rc>, - ... +... LL | struct Bar<'a> { LL ~ y: (Box>, Box>), | diff --git a/tests/ui/suggestions/issue-68049-2.stderr b/tests/ui/suggestions/issue-68049-2.stderr index 449ecabeb7f..91def27bfcd 100644 --- a/tests/ui/suggestions/issue-68049-2.stderr +++ b/tests/ui/suggestions/issue-68049-2.stderr @@ -19,7 +19,7 @@ help: consider changing this to be a mutable reference in the `impl` method and | LL ~ fn example(&mut self, input: &i32); LL | } - ... +... LL | impl Hello for Test2 { LL ~ fn example(&mut self, input: &i32) { | diff --git a/tests/ui/try-trait/try-operator-on-main.stderr b/tests/ui/try-trait/try-operator-on-main.stderr index ba6eacde68f..d22117165c1 100644 --- a/tests/ui/try-trait/try-operator-on-main.stderr +++ b/tests/ui/try-trait/try-operator-on-main.stderr @@ -12,7 +12,7 @@ help: consider adding return type | LL ~ fn main() -> Result<(), Box> { LL | // error for a `Try` type on a non-`Try` fn - ... +... LL | try_trait_generic::<()>(); LL + LL + Ok(()) diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr index c0fce5c2aaa..926e1c72f2f 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-lifetime-elision.stderr @@ -14,7 +14,7 @@ help: consider introducing a named lifetime parameter | LL ~ fn main<'a>() { LL | eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>, - ... +... LL | LL ~ let _: dyn Foo(&'a isize, &'a usize) -> &'a usize; |