Fix ... in multline code-skips in suggestions · rust-lang/rust@9fd7784 (original) (raw)

File tree

18 files changed

lines changed

18 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -1905,7 +1905,7 @@ impl HumanEmitter {
1905 1905 //
1906 1906 // LL | this line was highlighted
1907 1907 // LL | this line is just for context
1908 -// ...
1908 +// ...
1909 1909 // LL | this line is just for context
1910 1910 // LL | this line was highlighted
1911 1911 _ => {
@@ -1926,7 +1926,7 @@ impl HumanEmitter {
1926 1926 )
1927 1927 }
1928 1928
1929 - buffer.puts(row_num, max_line_num_len - 1, "...", Style::LineNumber);
1929 + buffer.puts(row_num, 0, "...", Style::LineNumber);
1930 1930 row_num += 1;
1931 1931
1932 1932 if let Some((p, l)) = last_line {
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ LL | }
62 62 LL | match s.len() {
63 63 LL ~ 10 => 2,
64 64 LL | 20 => {
65 - ...
65 +...
66 66 LL | if foo() {
67 67 LL ~ return 20;
68 68 LL | }
Original file line number Diff line number Diff line change
@@ -212,7 +212,7 @@ help: check if the original Iterator contains an element instead of collecting t
212 212 |
213 213 LL ~
214 214 LL |
215 - ...
215 +...
216 216 LL | // Do lint
217 217 LL ~ vec.iter().map(|k
218 218 |
Original file line number Diff line number Diff line change
@@ -215,7 +215,7 @@ help: move the declaration `x` here
215 215 |
216 216 LL ~
217 217 LL | // types that should be considered insignificant
218 - ...
218 +...
219 219 LL | let y = Box::new(4);
220 220 LL ~ let x = SignificantDrop;
221 221 |
Original file line number Diff line number Diff line change
@@ -518,7 +518,7 @@ help: remove `return`
518 518 |
519 519 LL ~ 10
520 520 LL | },
521 - ...
521 +...
522 522 LL | },
523 523 LL ~ }
524 524 |
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ help: add a dummy let to cause `fptr` to be fully captured
17 17 |
18 18 LL ~ thread::spawn(move |
19 19 LL |
20 - ...
20 +...
21 21 LL |
22 22 LL ~ } }).join().unwrap();
23 23 |
@@ -39,7 +39,7 @@ help: add a dummy let to cause `fptr` to be fully captured
39 39 |
40 40 LL ~ thread::spawn(move |
41 41 LL |
42 - ...
42 +...
43 43 LL |
44 44 LL ~ } }).join().unwrap();
45 45 |
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ help: add a dummy let to cause `fptr1`, `fptr2` to be fully captured
109 109 |
110 110 LL ~ thread::spawn(move |
111 111 LL |
112 - ...
112 +...
113 113 LL |
114 114 LL ~ } }).join().unwrap();
115 115 |
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ help: a macro with this name exists at the root of the crate
209 209 |
210 210 LL ~ issue_59764::{makro as foobar,
211 211 LL |
212 - ...
212 +...
213 213 LL |
214 214 LL ~ foo::{baz}
215 215 |
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ help: try comparing the cast value
64 64 |
65 65 LL ~ println!("{}", (a
66 66 LL |
67 - ...
67 +...
68 68 LL |
69 69 LL ~ usize)
70 70 |
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
17 17 |
18 18 LL ~ Array(Box),
19 19 LL | TypeVariable(()),
20 - ...
20 +...
21 21 LL | Base(BaseType),
22 22 LL ~ Object(Box),
23 23 |
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ help: try placing this code inside a block
8 8 |
9 9 LL ~ let Some(_) = Some(()) else { if true {
10 10 LL |
11 - ...
11 +...
12 12 LL | return;
13 13 LL ~ } };
14 14 |
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ help: you might want to use `if let` to ignore the variant that isn't matched
27 27 |
28 28 LL ~ if let Some(1) = loop {
29 29 LL |
30 - ...
30 +...
31 31 LL | return;
32 32 LL ~ } { todo!() };
33 33 |
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ help: consider moving the expression out of the loop so it is only moved once
26 26 LL ~ for foo in foos { let mut value = baz.push(foo);
27 27 LL ~ for bar in &bars { if foo == *bar {
28 28 LL |
29 - ...
29 +...
30 30 LL |
31 31 LL ~ value;
32 32 |
@@ -69,7 +69,7 @@ help: consider moving the expression out of the loop so it is only moved once
69 69 LL ~ let mut value = baz.push(foo);
70 70 LL ~ for bar in &bars {
71 71 LL |
72 - ...
72 +...
73 73 LL | if foo == *bar {
74 74 LL ~ value;
75 75 |
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ help: consider enclosing expression in a block
54 54 |
55 55 LL ~ let _i = 'label: { match x {
56 56 LL | 0 => 42,
57 - ...
57 +...
58 58 LL | _ => 1,
59 59 LL ~ } };
60 60 |
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
17 17 |
18 18 LL ~ bar: Box<Bar<'a>>,
19 19 LL | b: Rc<Bar<'a>>,
20 - ...
20 +...
21 21 LL | struct Bar<'a> {
22 22 LL ~ y: (Box<Foo<'a>>, Box<Foo<'a>>),
23 23 |
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ help: consider changing this to be a mutable reference in the `impl` method and
19 19 |
20 20 LL ~ fn example(&mut self, input: &i32);
21 21 LL | }
22 - ...
22 +...
23 23 LL | impl Hello for Test2 {
24 24 LL ~ fn example(&mut self, input: &i32) {
25 25 |
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ help: consider adding return type
12 12 |
13 13 LL ~ fn main() -> Result<(), Box> {
14 14 LL | // error for a `Try` type on a non-`Try` fn
15 - ...
15 +...
16 16 LL | try_trait_generic::<()>();
17 17 LL +
18 18 LL + Ok(())
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ help: consider introducing a named lifetime parameter
14 14 |
15 15 LL ~ fn main<'a>() {
16 16 LL | eq::< dyn for<'a> Foo<(&'a isize,), Output=&'a isize>,
17 - ...
17 +...
18 18 LL |
19 19 LL ~ let _: dyn Foo(&'a isize, &'a usize) -> &'a usize;
20 20 |