Skip to content

Commit 293e1b6

Browse files
committed
diagnostics: fix trailing space
1 parent 37a4225 commit 293e1b6

File tree

151 files changed

+484
-484
lines changed

Some content is hidden

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

151 files changed

+484
-484
lines changed

compiler/rustc_errors/src/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ impl EmitterWriter {
19201920
// Only show an underline in the suggestions if the suggestion is not the
19211921
// entirety of the code being shown and the displayed code is not multiline.
19221922
if let DisplaySuggestion::Diff | DisplaySuggestion::Underline = show_code_change {
1923-
draw_col_separator(&mut buffer, row_num, max_line_num_len + 1);
1923+
draw_col_separator_no_space(&mut buffer, row_num, max_line_num_len + 1);
19241924
for part in parts {
19251925
let span_start_pos = sm.lookup_char_pos(part.span.lo()).col_display;
19261926
let span_end_pos = sm.lookup_char_pos(part.span.hi()).col_display;

src/test/ui/asm/type-check-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ help: consider removing the borrow
5858
|
5959
LL - asm!("{}", const &0);
6060
LL + asm!("{}", const 0);
61-
|
61+
|
6262

6363
error: invalid asm output
6464
--> $DIR/type-check-1.rs:15:29

src/test/ui/associated-type-bounds/type-alias.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ help: the clause will not be checked when the type alias is used, and should be
99
|
1010
LL - type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
1111
LL + type _TaWhere1<T> = T;
12-
|
12+
|
1313

1414
warning: where clauses are not enforced in type aliases
1515
--> $DIR/type-alias.rs:6:25
@@ -21,7 +21,7 @@ help: the clause will not be checked when the type alias is used, and should be
2121
|
2222
LL - type _TaWhere2<T> where T: Iterator<Item: 'static> = T;
2323
LL + type _TaWhere2<T> = T;
24-
|
24+
|
2525

2626
warning: where clauses are not enforced in type aliases
2727
--> $DIR/type-alias.rs:7:25
@@ -33,7 +33,7 @@ help: the clause will not be checked when the type alias is used, and should be
3333
|
3434
LL - type _TaWhere3<T> where T: Iterator<Item: 'static> = T;
3535
LL + type _TaWhere3<T> = T;
36-
|
36+
|
3737

3838
warning: where clauses are not enforced in type aliases
3939
--> $DIR/type-alias.rs:8:25
@@ -45,7 +45,7 @@ help: the clause will not be checked when the type alias is used, and should be
4545
|
4646
LL - type _TaWhere4<T> where T: Iterator<Item: 'static + Copy + Send> = T;
4747
LL + type _TaWhere4<T> = T;
48-
|
48+
|
4949

5050
warning: where clauses are not enforced in type aliases
5151
--> $DIR/type-alias.rs:9:25
@@ -57,7 +57,7 @@ help: the clause will not be checked when the type alias is used, and should be
5757
|
5858
LL - type _TaWhere5<T> where T: Iterator<Item: for<'a> Into<&'a u8>> = T;
5959
LL + type _TaWhere5<T> = T;
60-
|
60+
|
6161

6262
warning: where clauses are not enforced in type aliases
6363
--> $DIR/type-alias.rs:10:25
@@ -69,7 +69,7 @@ help: the clause will not be checked when the type alias is used, and should be
6969
|
7070
LL - type _TaWhere6<T> where T: Iterator<Item: Iterator<Item: Copy>> = T;
7171
LL + type _TaWhere6<T> = T;
72-
|
72+
|
7373

7474
warning: bounds on generic parameters are not enforced in type aliases
7575
--> $DIR/type-alias.rs:12:20
@@ -81,7 +81,7 @@ help: the bound will not be checked when the type alias is used, and should be r
8181
|
8282
LL - type _TaInline1<T: Iterator<Item: Copy>> = T;
8383
LL + type _TaInline1<T> = T;
84-
|
84+
|
8585

8686
warning: bounds on generic parameters are not enforced in type aliases
8787
--> $DIR/type-alias.rs:13:20
@@ -93,7 +93,7 @@ help: the bound will not be checked when the type alias is used, and should be r
9393
|
9494
LL - type _TaInline2<T: Iterator<Item: 'static>> = T;
9595
LL + type _TaInline2<T> = T;
96-
|
96+
|
9797

9898
warning: bounds on generic parameters are not enforced in type aliases
9999
--> $DIR/type-alias.rs:14:20
@@ -105,7 +105,7 @@ help: the bound will not be checked when the type alias is used, and should be r
105105
|
106106
LL - type _TaInline3<T: Iterator<Item: 'static>> = T;
107107
LL + type _TaInline3<T> = T;
108-
|
108+
|
109109

110110
warning: bounds on generic parameters are not enforced in type aliases
111111
--> $DIR/type-alias.rs:15:20
@@ -117,7 +117,7 @@ help: the bound will not be checked when the type alias is used, and should be r
117117
|
118118
LL - type _TaInline4<T: Iterator<Item: 'static + Copy + Send>> = T;
119119
LL + type _TaInline4<T> = T;
120-
|
120+
|
121121

122122
warning: bounds on generic parameters are not enforced in type aliases
123123
--> $DIR/type-alias.rs:16:20
@@ -129,7 +129,7 @@ help: the bound will not be checked when the type alias is used, and should be r
129129
|
130130
LL - type _TaInline5<T: Iterator<Item: for<'a> Into<&'a u8>>> = T;
131131
LL + type _TaInline5<T> = T;
132-
|
132+
|
133133

134134
warning: bounds on generic parameters are not enforced in type aliases
135135
--> $DIR/type-alias.rs:17:20
@@ -141,7 +141,7 @@ help: the bound will not be checked when the type alias is used, and should be r
141141
|
142142
LL - type _TaInline6<T: Iterator<Item: Iterator<Item: Copy>>> = T;
143143
LL + type _TaInline6<T> = T;
144-
|
144+
|
145145

146146
warning: 12 warnings emitted
147147

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: try removing the `+`
88
|
99
LL - 2 + +2;
1010
LL + 2 + 2;
11-
|
11+
|
1212

1313
error: aborting due to previous error
1414

src/test/ui/async-await/issue-70594.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ help: remove the `.await`
3131
|
3232
LL - [1; ().await];
3333
LL + [1; ()];
34-
|
34+
|
3535

3636
error: aborting due to 4 previous errors
3737

src/test/ui/async-await/issues/issue-54752-async-block.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ help: remove these parentheses
99
|
1010
LL - fn main() { let _a = (async { }); }
1111
LL + fn main() { let _a = async { }; }
12-
|
12+
|
1313

1414
warning: 1 warning emitted
1515

src/test/ui/async-await/issues/issue-62009-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ help: remove the `.await`
3737
|
3838
LL - (|_| 2333).await;
3939
LL + (|_| 2333);
40-
|
40+
|
4141

4242
error: aborting due to 4 previous errors
4343

src/test/ui/async-await/unnecessary-await.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ help: remove the `.await`
1313
|
1414
LL - boo().await;
1515
LL + boo();
16-
|
16+
|
1717
help: alternatively, consider making `fn boo` asynchronous
1818
|
1919
LL | async fn boo() {}

src/test/ui/block-result/issue-5500.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help: consider removing the borrow
1212
|
1313
LL - &panic!()
1414
LL + panic!()
15-
|
15+
|
1616

1717
error: aborting due to previous error
1818

src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ help: try removing `&mut` here
1313
|
1414
LL - h(&mut b);
1515
LL + h(b);
16-
|
16+
|
1717

1818
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
1919
--> $DIR/mut-borrow-of-mut-ref.rs:11:12
@@ -30,7 +30,7 @@ help: try removing `&mut` here
3030
|
3131
LL - g(&mut &mut b);
3232
LL + g(&mut b);
33-
|
33+
|
3434

3535
error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable
3636
--> $DIR/mut-borrow-of-mut-ref.rs:18:12
@@ -47,7 +47,7 @@ help: try removing `&mut` here
4747
|
4848
LL - h(&mut &mut b);
4949
LL + h(&mut b);
50-
|
50+
|
5151

5252
error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
5353
--> $DIR/mut-borrow-of-mut-ref.rs:35:5

src/test/ui/cast/issue-89497.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: consider borrowing the value
88
|
99
LL - let _reference: &'static i32 = unsafe { pointer as *const i32 as &'static i32 };
1010
LL + let _reference: &'static i32 = unsafe { &*(pointer as *const i32) };
11-
|
11+
|
1212

1313
error: aborting due to previous error
1414

src/test/ui/const-generics/const-argument-if-length.full.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
1212
|
1313
LL - pub struct AtLeastByte<T: ?Sized> {
1414
LL + pub struct AtLeastByte<T> {
15-
|
15+
|
1616
help: borrowed types always have a statically known size
1717
|
1818
LL | value: &T,

src/test/ui/const-generics/const-argument-if-length.min.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
2121
|
2222
LL - pub struct AtLeastByte<T: ?Sized> {
2323
LL + pub struct AtLeastByte<T> {
24-
|
24+
|
2525
help: borrowed types always have a statically known size
2626
|
2727
LL | value: &T,

src/test/ui/const-generics/parser-error-recovery/issue-89013-no-assoc.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: the `const` keyword is only needed in the definition of the type
88
|
99
LL - impl Foo<const 3> for Bar {
1010
LL + impl Foo<3> for Bar {
11-
|
11+
|
1212

1313
error: aborting due to previous error
1414

src/test/ui/const-generics/parser-error-recovery/issue-89013.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: the `const` keyword is only needed in the definition of the type
88
|
99
LL - impl Foo<N = const 3> for Bar {
1010
LL + impl Foo<N = 3> for Bar {
11-
|
11+
|
1212

1313
error[E0658]: associated const equality is incomplete
1414
--> $DIR/issue-89013.rs:9:10

src/test/ui/const-generics/unused_braces.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ help: remove these braces
1313
|
1414
LL - let _: A<{ 7 }>;
1515
LL + let _: A<7>;
16-
|
16+
|
1717

1818
warning: 1 warning emitted
1919

src/test/ui/deprecation/try-macro-suggestion.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ help: you can use the `?` operator instead
2121
|
2222
LL - Ok(try!(Ok(())))
2323
LL + Ok(Ok(())?)
24-
|
24+
|
2525
help: alternatively, you can still access the deprecated `try!()` macro using the "raw identifier" syntax
2626
|
2727
LL | Ok(r#try!(Ok(())))

src/test/ui/did_you_mean/compatible-variants.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ help: try removing this `?`
7171
|
7272
LL - c()?
7373
LL + c()
74-
|
74+
|
7575
help: try adding an expression at the end of the block
7676
|
7777
LL ~ c()?;

src/test/ui/did_you_mean/issue-34126.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ help: try removing `&mut` here
1313
|
1414
LL - self.run(&mut self);
1515
LL + self.run(self);
16-
|
16+
|
1717

1818
error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
1919
--> $DIR/issue-34126.rs:6:18

src/test/ui/dst/dst-object-from-unsized-type.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
1111
|
1212
LL - fn test1<T: ?Sized + Foo>(t: &T) {
1313
LL + fn test1<T: Foo>(t: &T) {
14-
|
14+
|
1515

1616
error[E0277]: the size for values of type `T` cannot be known at compilation time
1717
--> $DIR/dst-object-from-unsized-type.rs:13:23
@@ -26,7 +26,7 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
2626
|
2727
LL - fn test2<T: ?Sized + Foo>(t: &T) {
2828
LL + fn test2<T: Foo>(t: &T) {
29-
|
29+
|
3030

3131
error[E0277]: the size for values of type `str` cannot be known at compilation time
3232
--> $DIR/dst-object-from-unsized-type.rs:18:28

src/test/ui/dyn-keyword/dyn-2018-edition-lint.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ help: use `dyn`
1515
|
1616
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
1717
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
18-
|
18+
|
1919

2020
error: trait objects without an explicit `dyn` are deprecated
2121
--> $DIR/dyn-2018-edition-lint.rs:4:35
@@ -29,7 +29,7 @@ help: use `dyn`
2929
|
3030
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
3131
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
32-
|
32+
|
3333

3434
error: trait objects without an explicit `dyn` are deprecated
3535
--> $DIR/dyn-2018-edition-lint.rs:17:14
@@ -43,7 +43,7 @@ help: use `dyn`
4343
|
4444
LL - let _x: &SomeTrait = todo!();
4545
LL + let _x: &dyn SomeTrait = todo!();
46-
|
46+
|
4747

4848
error: trait objects without an explicit `dyn` are deprecated
4949
--> $DIR/dyn-2018-edition-lint.rs:4:17
@@ -57,7 +57,7 @@ help: use `dyn`
5757
|
5858
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
5959
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
60-
|
60+
|
6161

6262
error: trait objects without an explicit `dyn` are deprecated
6363
--> $DIR/dyn-2018-edition-lint.rs:4:17
@@ -71,7 +71,7 @@ help: use `dyn`
7171
|
7272
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
7373
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
74-
|
74+
|
7575

7676
error: trait objects without an explicit `dyn` are deprecated
7777
--> $DIR/dyn-2018-edition-lint.rs:4:35
@@ -85,7 +85,7 @@ help: use `dyn`
8585
|
8686
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
8787
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
88-
|
88+
|
8989

9090
error: trait objects without an explicit `dyn` are deprecated
9191
--> $DIR/dyn-2018-edition-lint.rs:4:35
@@ -99,7 +99,7 @@ help: use `dyn`
9999
|
100100
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
101101
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
102-
|
102+
|
103103

104104
error: aborting due to 7 previous errors
105105

src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ help: add `dyn` keyword before this trait
88
|
99
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
1010
LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
11-
|
11+
|
1212

1313
error[E0782]: trait objects must include the `dyn` keyword
1414
--> $DIR/dyn-2021-edition-error.rs:3:35
@@ -20,7 +20,7 @@ help: add `dyn` keyword before this trait
2020
|
2121
LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
2222
LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
23-
|
23+
|
2424

2525
error: aborting due to 2 previous errors
2626

src/test/ui/dyn-keyword/dyn-angle-brackets.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ help: use `dyn`
1515
|
1616
LL - <fmt::Debug>::fmt(self, f)
1717
LL + <dyn fmt::Debug>::fmt(self, f)
18-
|
18+
|
1919

2020
error: aborting due to previous error
2121

0 commit comments

Comments
 (0)