Skip to content

Commit 169231c

Browse files
committed
fix one more case of trailing space
1 parent 293e1b6 commit 169231c

File tree

105 files changed

+140
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+140
-140
lines changed

compiler/rustc_errors/src/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ impl EmitterWriter {
819819
}
820820
buffer.puts(line_offset, 0, &self.maybe_anonymized(line_index), Style::LineNumber);
821821

822-
draw_col_separator(buffer, line_offset, width_offset - 2);
822+
draw_col_separator_no_space(buffer, line_offset, width_offset - 2);
823823
}
824824

825825
fn render_source_line(

src/test/ui/associated-types/defaults-specialization.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ error[E0053]: method `make` has an incompatible type for trait
3030
|
3131
LL | default type Ty = bool;
3232
| ----------------------- expected this associated type
33-
LL |
33+
LL |
3434
LL | fn make() -> bool { true }
3535
| ^^^^
3636
| |
@@ -50,7 +50,7 @@ error[E0308]: mismatched types
5050
|
5151
LL | type Ty = u8;
5252
| ------------- associated type defaults can't be assumed inside the trait defining them
53-
LL |
53+
LL |
5454
LL | fn make() -> Self::Ty {
5555
| -------- expected `<Self as Tr>::Ty` because of return type
5656
LL | 0u8
@@ -77,7 +77,7 @@ error[E0308]: mismatched types
7777
|
7878
LL | default type Ty = bool;
7979
| ----------------------- expected this associated type
80-
LL |
80+
LL |
8181
LL | fn make() -> Self::Ty { true }
8282
| -------- ^^^^ expected associated type, found `bool`
8383
| |

src/test/ui/associated-types/issue-22560.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | / trait Sub<Rhs=Self> {
55
LL | | type Output;
66
LL | | }
77
| |_- type parameter `Rhs` must be specified for this
8-
LL |
8+
LL |
99
LL | type Test = dyn Add + Sub;
1010
| ^^^ help: set the type parameter to the desired type: `Sub<Rhs>`
1111
|

src/test/ui/async-await/issue-67765-async-diagnostic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0515]: cannot return value referencing local variable `s`
33
|
44
LL | let b = &s[..];
55
| - `s` is borrowed here
6-
LL |
6+
LL |
77
LL | Err(b)?;
88
| ^^^^^^^ returns a value referencing data owned by the current function
99

src/test/ui/blind/blind-item-item-shadow.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0255]: the name `foo` is defined multiple times
33
|
44
LL | mod foo { pub mod foo { } }
55
| ------- previous definition of the module `foo` here
6-
LL |
6+
LL |
77
LL | use foo::foo;
88
| ^^^^^^^^ `foo` reimported here
99
|

src/test/ui/borrowck/borrow-raw-address-of-borrowed.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
33
|
44
LL | let y = &x;
55
| -- immutable borrow occurs here
6-
LL |
6+
LL |
77
LL | let q = &raw mut x;
88
| ^^^^^^^^^^ mutable borrow occurs here
9-
LL |
9+
LL |
1010
LL | drop(y);
1111
| - immutable borrow later used here
1212

@@ -15,7 +15,7 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta
1515
|
1616
LL | let y = &mut x;
1717
| ------ mutable borrow occurs here
18-
LL |
18+
LL |
1919
LL | let p = &raw const x;
2020
| ^^^^^^^^^^^^ immutable borrow occurs here
2121
...
@@ -30,7 +30,7 @@ LL | let y = &mut x;
3030
...
3131
LL | let q = &raw mut x;
3232
| ^^^^^^^^^^ second mutable borrow occurs here
33-
LL |
33+
LL |
3434
LL | drop(y);
3535
| - first borrow later used here
3636

src/test/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
33
|
44
LL | let x = &0;
55
| -- help: consider changing this to be a mutable reference: `&mut 0`
6-
LL |
6+
LL |
77
LL | let q = &raw mut *x;
88
| ^^^^^^^^^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
99

@@ -12,7 +12,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer
1212
|
1313
LL | let x = &0 as *const i32;
1414
| -- help: consider changing this to be a mutable pointer: `&mut 0`
15-
LL |
15+
LL |
1616
LL | let q = &raw mut *x;
1717
| ^^^^^^^^^^^ `x` is a `*const` pointer, so the data it refers to cannot be borrowed as mutable
1818

src/test/ui/borrowck/borrow-tuple-fields.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let r = &x.0;
55
| ---- borrow of `x.0` occurs here
66
LL | let y = x;
77
| ^ move out of `x` occurs here
8-
LL |
8+
LL |
99
LL | r.use_ref();
1010
| ----------- borrow later used here
1111

src/test/ui/borrowck/borrowck-assign-comp-idx.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immuta
33
|
44
LL | let q: &isize = &p[0];
55
| - immutable borrow occurs here
6-
LL |
6+
LL |
77
LL | p[0] = 5;
88
| ^ mutable borrow occurs here
9-
LL |
9+
LL |
1010
LL | println!("{}", *q);
1111
| -- immutable borrow later used here
1212

src/test/ui/borrowck/borrowck-loan-rcvr-overloaded-op.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0503]: cannot use `p` because it was mutably borrowed
33
|
44
LL | let q = &mut p;
55
| ------ borrow of `p` occurs here
6-
LL |
6+
LL |
77
LL | p + 3;
88
| ^ use of borrowed `p`
99
...
@@ -18,7 +18,7 @@ LL | let q = &mut p;
1818
...
1919
LL | p.times(3);
2020
| ^^^^^^^^^^ immutable borrow occurs here
21-
LL |
21+
LL |
2222
LL | *q + 3; // OK to use the new alias `q`
2323
| -- mutable borrow later used here
2424

src/test/ui/borrowck/borrowck-loan-rcvr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LL | let l = &mut p;
1818
| ------ mutable borrow occurs here
1919
LL | p.impurem();
2020
| ^^^^^^^^^^^ immutable borrow occurs here
21-
LL |
21+
LL |
2222
LL | l.x += 1;
2323
| -------- mutable borrow later used here
2424

src/test/ui/borrowck/borrowck-move-from-subpath-of-borrowed-path.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0505]: cannot move out of `*a` because it is borrowed
33
|
44
LL | let b = &a;
55
| -- borrow of `a` occurs here
6-
LL |
6+
LL |
77
LL | let z = *a;
88
| ^^ move out of `*a` occurs here
99
LL | b.use_ref();

src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0382]: use of moved value: `t`
33
|
44
LL | let t: Box<_> = Box::new(3);
55
| - move occurs because `t` has type `Box<isize>`, which does not implement the `Copy` trait
6-
LL |
6+
LL |
77
LL | call_f(move|| { *t + 1 });
88
| ------ -- variable moved due to use in closure
99
| |

src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0505]: cannot move out of `s` because it is borrowed
33
|
44
LL | let rs = &mut s;
55
| ------ borrow of `s` occurs here
6-
LL |
6+
LL |
77
LL | println!("{}", f[s]);
88
| ^ move out of `s` occurs here
99
...

src/test/ui/borrowck/borrowck-slice-pattern-element-loan-array.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
2323
|
2424
LL | let [.., _, ref from_end4, ref from_end3, _, ref from_end1] = *s;
2525
| ------------- immutable borrow occurs here
26-
LL |
26+
LL |
2727
LL | let [_, _, ref mut from_begin2, ..] = *s;
2828
| ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here
2929
LL | nop(&[from_begin2, from_end1, from_end3, from_end4]);
@@ -45,7 +45,7 @@ error[E0502]: cannot borrow `s[..]` as mutable because it is also borrowed as im
4545
|
4646
LL | let [ref from_begin0, ref from_begin1, _, ref from_begin3, _, ..] = *s;
4747
| --------------- immutable borrow occurs here
48-
LL |
48+
LL |
4949
LL | let [.., ref mut from_end3, _, _] = *s;
5050
| ^^^^^^^^^^^^^^^^^ mutable borrow occurs here
5151
LL | nop(&[from_begin0, from_begin1, from_begin3, from_end3]);

src/test/ui/borrowck/borrowck-union-borrow.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ LL | let ra = &mut u.a;
9999
| -------- borrow of `u.a` occurs here
100100
LL | let b = u.b;
101101
| ^^^ use of borrowed `u.a`
102-
LL |
102+
LL |
103103
LL | drop(ra);
104104
| -- borrow later used here
105105

src/test/ui/borrowck/copy-suggestion-region-vid.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0382]: borrow of moved value: `helpers`
33
|
44
LL | let helpers = [vec![], vec![]];
55
| ------- move occurs because `helpers` has type `[Vec<&i64>; 2]`, which does not implement the `Copy` trait
6-
LL |
6+
LL |
77
LL | HelperStruct { helpers, is_empty: helpers[0].is_empty() }
88
| ------- ^^^^^^^^^^^^^^^^^^^^^ value borrowed here after move
99
| |

src/test/ui/borrowck/issue-58776-borrowck-scans-children.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let res = (|| (|| &greeting)())();
55
| -- -------- borrow occurs due to use in closure
66
| |
77
| borrow of `greeting` occurs here
8-
LL |
8+
LL |
99
LL | greeting = "DEALLOCATED".to_string();
1010
| ^^^^^^^^ assignment to borrowed `greeting` occurs here
1111
...

src/test/ui/borrowck/two-phase-allow-access-during-reservation.nll_target.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0503]: cannot use `i` because it was mutably borrowed
33
|
44
LL | /*1*/ let p = &mut i; // (reservation of `i` starts here)
55
| ------ borrow of `i` occurs here
6-
LL |
6+
LL |
77
LL | /*2*/ let j = i; // OK: `i` is only reserved here
88
| ^ use of borrowed `i`
99
...

src/test/ui/borrowck/two-phase-reservation-sharing-interference-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immuta
33
|
44
LL | let shared = &v;
55
| -- immutable borrow occurs here
6-
LL |
6+
LL |
77
LL | v.extend(shared);
88
| ^^------^^^^^^^^
99
| | |

src/test/ui/borrowck/two-phase-sneaky.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | v[0].push_str({
55
| - -------- first borrow later used by call
66
| |
77
| first mutable borrow occurs here
8-
LL |
8+
LL |
99
LL | v.push(format!("foo"));
1010
| ^^^^^^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
1111

src/test/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0596]: cannot borrow `**ref_mref_x` as mutable, as it is behind a `&` ref
33
|
44
LL | let ref_mref_x = &mref_x;
55
| ------- help: consider changing this to be a mutable reference: `&mut mref_x`
6-
LL |
6+
LL |
77
LL | let c = || {
88
| ^^ `ref_mref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
99
LL |

src/test/ui/closures/issue-6801.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let sq = || { *x * *x };
55
| -- -- borrow occurs due to use in closure
66
| |
77
| borrow of `x` occurs here
8-
LL |
8+
LL |
99
LL | twice(x);
1010
| ^ move out of `x` occurs here
1111
LL | invoke(sq);

src/test/ui/closures/issue-82438-mut-without-upvar.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0596]: cannot borrow `c` as mutable, as it is not declared as mutable
33
|
44
LL | let c = |a, b, c, d| {};
55
| - help: consider changing this to be mutable: `mut c`
6-
LL |
6+
LL |
77
LL | A.f(participant_name, &mut c);
88
| ^^^^^^ cannot borrow as mutable
99

src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0751]: found both positive and negative implementation of trait `std::mar
33
|
44
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
55
| ------------------------------------------------------ positive implementation here
6-
LL |
6+
LL |
77
LL | impl<T: MyTrait> !Send for TestType<T> {}
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here
99

src/test/ui/coherence/coherence-fn-implied-bounds.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error: conflicting implementations of trait `Trait` for type `for<'a, 'b> fn(&'a
33
|
44
LL | impl Trait for for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32 {}
55
| ------------------------------------------------------------------ first implementation here
6-
LL |
6+
LL |
77
LL | impl Trait for for<'c> fn(&'c &'c u32, &'c &'c u32) -> &'c u32 {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32`
99
|

src/test/ui/coherence/coherence-free-vs-bound-region.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error: conflicting implementations of trait `TheTrait` for type `fn(&u8)`
33
|
44
LL | impl<'a> TheTrait for fn(&'a u8) {}
55
| -------------------------------- first implementation here
6-
LL |
6+
LL |
77
LL | impl TheTrait for fn(&u8) {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&u8)`
99
|

src/test/ui/coherence/coherence-projection-conflict-orphan.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`
33
|
44
LL | impl Foo<i32> for i32 { }
55
| --------------------- first implementation here
6-
LL |
6+
LL |
77
LL | impl<A:Iterator> Foo<A::Item> for A { }
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
99
|

src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::optio
33
|
44
LL | impl <P, T: Foo<P>> Foo<P> for Option<T> {}
55
| ---------------------------------------- first implementation here
6-
LL |
6+
LL |
77
LL | impl<T, U> Foo<T> for Option<U> { }
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>`
99

src/test/ui/coherence/coherence-projection-conflict.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0119]: conflicting implementations of trait `Foo<i32>` for type `i32`
33
|
44
LL | impl Foo<i32> for i32 { }
55
| --------------------- first implementation here
6-
LL |
6+
LL |
77
LL | impl<A:Bar> Foo<A::Output> for A { }
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `i32`
99

src/test/ui/coherence/coherence-subtyping.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ warning: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> f
33
|
44
LL | impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}
55
| ---------------------------------------------------------- first implementation here
6-
LL |
6+
LL |
77
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
99
|

src/test/ui/derives/issue-91550.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ error[E0599]: the method `use_eq` exists for struct `Object<NoDerives>`, but its
2323
|
2424
LL | pub struct NoDerives;
2525
| --------------------- doesn't satisfy `NoDerives: Eq`
26-
LL |
26+
LL |
2727
LL | struct Object<T>(T);
2828
| -------------------- method `use_eq` not found for this
2929
...
@@ -42,7 +42,7 @@ error[E0599]: the method `use_ord` exists for struct `Object<NoDerives>`, but it
4242
|
4343
LL | pub struct NoDerives;
4444
| --------------------- doesn't satisfy `NoDerives: Ord`
45-
LL |
45+
LL |
4646
LL | struct Object<T>(T);
4747
| -------------------- method `use_ord` not found for this
4848
...
@@ -64,7 +64,7 @@ LL | pub struct NoDerives;
6464
| |
6565
| doesn't satisfy `NoDerives: Ord`
6666
| doesn't satisfy `NoDerives: PartialOrd`
67-
LL |
67+
LL |
6868
LL | struct Object<T>(T);
6969
| -------------------- method `use_ord_and_partial_ord` not found for this
7070
...

src/test/ui/error-codes/E0255.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0255]: the name `foo` is defined multiple times
33
|
44
LL | use bar::foo;
55
| -------- previous import of the value `foo` here
6-
LL |
6+
LL |
77
LL | fn foo() {}
88
| ^^^^^^^^ `foo` redefined here
99
|

src/test/ui/error-codes/E0259.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0259]: the name `alloc` is defined multiple times
33
|
44
LL | extern crate alloc;
55
| ------------------- previous import of the extern crate `alloc` here
6-
LL |
6+
LL |
77
LL | extern crate libc as alloc;
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `alloc` reimported here
99
|

0 commit comments

Comments
 (0)