Skip to content

Commit db61752

Browse files
committed
Let's hold off on the multiline note tweak in ASCII art output
We can safely enable that independently, later.
1 parent 85ba846 commit db61752

File tree

180 files changed

+641
-641
lines changed

Some content is hidden

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

180 files changed

+641
-641
lines changed

compiler/rustc_errors/src/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ impl HumanEmitter {
14111411
}
14121412
let printed_lines =
14131413
self.msgs_to_buffer(&mut buffer, msgs, args, max_line_num_len, "note", None);
1414-
if is_cont {
1414+
if is_cont && matches!(self.theme, OutputTheme::Unicode) {
14151415
// There's another note after this one, associated to the subwindow above.
14161416
// We write additional vertical lines to join them:
14171417
// ╭▸ test.rs:3:3

compiler/rustc_parse/src/parser/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ error: foo
16901690
| ^^^^^^^^^^^^^ `a` is a good letter
16911691
|
16921692
= note: foo
1693-
| bar
1693+
bar
16941694
= note: foo
16951695
bar
16961696

src/tools/clippy/tests/ui/builtin_type_shadow.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LL | 42
1818
| ^^ expected type parameter `u32`, found integer
1919
|
2020
= note: expected type parameter `u32`
21-
| found type `{integer}`
21+
found type `{integer}`
2222
= note: the caller chooses a type for `u32` which can be different from `i32`
2323

2424
error: aborting due to 2 previous errors

src/tools/clippy/tests/ui/from_over_into_unfixable.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LL | impl Into<u8> for ContainsVal {
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424
|
2525
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
26-
| https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
26+
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
2727
= help: replace the `Into` implementation with `From<ContainsVal>`
2828

2929
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

src/tools/clippy/tests/ui/needless_continue.stderr

+25-25
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@ LL | | }
99
| |_________^
1010
|
1111
= help: consider dropping the `else` clause and merging the code that follows (in the loop) with the `if` block
12-
| if i % 2 == 0 && i % 3 == 0 {
13-
| println!("{}", i);
14-
| println!("{}", i + 1);
15-
| if i % 5 == 0 {
16-
| println!("{}", i + 2);
17-
| }
18-
| let i = 0;
19-
| println!("bar {} ", i);
20-
| // merged code follows:
21-
| println!("bleh");
22-
| {
23-
| println!("blah");
24-
| }
25-
| if !(!(i == 2) || !(i == 5)) {
26-
| println!("lama");
27-
| }
28-
| if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
29-
|
30-
| continue;
31-
| } else {
32-
| println!("Blabber");
33-
| println!("Jabber");
34-
| }
35-
| println!("bleh");
36-
| }
12+
if i % 2 == 0 && i % 3 == 0 {
13+
println!("{}", i);
14+
println!("{}", i + 1);
15+
if i % 5 == 0 {
16+
println!("{}", i + 2);
17+
}
18+
let i = 0;
19+
println!("bar {} ", i);
20+
// merged code follows:
21+
println!("bleh");
22+
{
23+
println!("blah");
24+
}
25+
if !(!(i == 2) || !(i == 5)) {
26+
println!("lama");
27+
}
28+
if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
29+
30+
continue;
31+
} else {
32+
println!("Blabber");
33+
println!("Jabber");
34+
}
35+
println!("bleh");
36+
}
3737
= note: `-D clippy::needless-continue` implied by `-D warnings`
3838
= help: to override `-D warnings` add `#[allow(clippy::needless_continue)]`
3939

src/tools/clippy/tests/ui/permissions_set_readonly_false.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | permissions.set_readonly(false);
66
|
77
= note: on Unix platforms this results in the file being world writable
88
= help: you can set the desired permissions using `PermissionsExt`. For more information, see
9-
| https://doc.rust-lang.org/std/os/unix/fs/trait.PermissionsExt.html
9+
https://doc.rust-lang.org/std/os/unix/fs/trait.PermissionsExt.html
1010
= note: `-D clippy::permissions-set-readonly-false` implied by `-D warnings`
1111
= help: to override `-D warnings` add `#[allow(clippy::permissions_set_readonly_false)]`
1212

tests/rustdoc-ui/intra-doc/warning.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
7575
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
7676
|
7777
= note: the link appears in this line:
78-
|
79-
| bar [BarD] bar
80-
| ^^^^
78+
79+
bar [BarD] bar
80+
^^^^
8181
= note: no item named `BarD` in scope
8282
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
8383

@@ -88,9 +88,9 @@ LL | f!("Foo\nbar [BarF] bar\nbaz");
8888
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
8989
|
9090
= note: the link appears in this line:
91-
|
92-
| bar [BarF] bar
93-
| ^^^^
91+
92+
bar [BarF] bar
93+
^^^^
9494
= note: no item named `BarF` in scope
9595
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
9696
= note: this warning originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -118,9 +118,9 @@ LL | #[doc = "single line [error]"]
118118
| ^^^^^^^^^^^^^^^^^^^^^
119119
|
120120
= note: the link appears in this line:
121-
|
122-
| single line [error]
123-
| ^^^^^
121+
122+
single line [error]
123+
^^^^^
124124
= note: no item named `error` in scope
125125
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
126126

@@ -131,9 +131,9 @@ LL | #[doc = "single line with \"escaping\" [error]"]
131131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132132
|
133133
= note: the link appears in this line:
134-
|
135-
| single line with "escaping" [error]
136-
| ^^^^^
134+
135+
single line with "escaping" [error]
136+
^^^^^
137137
= note: no item named `error` in scope
138138
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
139139

@@ -146,9 +146,9 @@ LL | | /// [error]
146146
| |___________^
147147
|
148148
= note: the link appears in this line:
149-
|
150-
| [error]
151-
| ^^^^^
149+
150+
[error]
151+
^^^^^
152152
= note: no item named `error` in scope
153153
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
154154

tests/rustdoc-ui/macro-docs.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ LL | m!();
88
| ---- in this macro invocation
99
|
1010
= note: the link appears in this line:
11-
|
12-
| [`long_cat`] is really long
13-
| ^^^^^^^^^^
11+
12+
[`long_cat`] is really long
13+
^^^^^^^^^^
1414
= note: no item named `long_cat` in scope
1515
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
1616
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

tests/rustdoc-ui/unescaped_backticks.stderr

+16-16
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ LL | | /// level changes.
280280
| |______________________^
281281
|
282282
= help: the opening backtick of a previous inline code may be missing
283-
| change: The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
284-
| to this: The `Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
283+
change: The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
284+
to this: The `Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
285285
= help: if you meant to use a literal backtick, escape it
286286
change: `None`. Otherwise, it will return `Some(Dispatch)`.
287287
to this: `None`. Otherwise, it will return `Some(Dispatch)\`.
@@ -316,8 +316,8 @@ LL | | /// level changes.
316316
| |______________________^
317317
|
318318
= help: a previous inline code might be longer than expected
319-
| change: Called before the filtered [`Layer]'s [`on_event`], to determine if
320-
| to this: Called before the filtered [`Layer`]'s [`on_event`], to determine if
319+
change: Called before the filtered [`Layer]'s [`on_event`], to determine if
320+
to this: Called before the filtered [`Layer`]'s [`on_event`], to determine if
321321
= help: if you meant to use a literal backtick, escape it
322322
change: `on_event` should be called.
323323
to this: `on_event\` should be called.
@@ -335,8 +335,8 @@ LL | | /// level changes.
335335
| |______________________^
336336
|
337337
= help: a previous inline code might be longer than expected
338-
| change: Therefore, if the `Filter will change the value returned by this
339-
| to this: Therefore, if the `Filter` will change the value returned by this
338+
change: Therefore, if the `Filter will change the value returned by this
339+
to this: Therefore, if the `Filter` will change the value returned by this
340340
= help: if you meant to use a literal backtick, escape it
341341
change: [`rebuild_interest_cache`][rebuild] is called after the value of the max
342342
to this: [`rebuild_interest_cache\`][rebuild] is called after the value of the max
@@ -657,8 +657,8 @@ LL | #[doc = concat!("\\", "`")]
657657
| ^^^^^^^^^^^^^^^^^^^^
658658
|
659659
= help: the opening backtick of an inline code may be missing
660-
| change: \`
661-
| to this: `\`
660+
change: \`
661+
to this: `\`
662662
= help: if you meant to use a literal backtick, escape it
663663
change: \`
664664
to this: \\`
@@ -670,8 +670,8 @@ LL | #[doc = "Addition is commutative, which means that add(a, b)` is the same a
670670
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
671671
|
672672
= help: the opening backtick of a previous inline code may be missing
673-
| change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
674-
| to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
673+
change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
674+
to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
675675
= help: if you meant to use a literal backtick, escape it
676676
change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
677677
to this: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)\`.
@@ -683,8 +683,8 @@ LL | #[doc = "Addition is commutative, which means that `add(a, b) is the same a
683683
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
684684
|
685685
= help: a previous inline code might be longer than expected
686-
| change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
687-
| to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
686+
change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
687+
to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
688688
= help: if you meant to use a literal backtick, escape it
689689
change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
690690
to this: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)\`.
@@ -696,8 +696,8 @@ LL | #[doc = "Addition is commutative, which means that `add(a, b)` is the same
696696
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
697697
|
698698
= help: the opening backtick of an inline code may be missing
699-
| change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
700-
| to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
699+
change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
700+
to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
701701
= help: if you meant to use a literal backtick, escape it
702702
change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
703703
to this: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)\`.
@@ -709,8 +709,8 @@ LL | #[doc = "Addition is commutative, which means that `add(a, b)` is the same
709709
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
710710
|
711711
= help: the closing backtick of an inline code may be missing
712-
| change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
713-
| to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
712+
change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
713+
to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
714714
= help: if you meant to use a literal backtick, escape it
715715
change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
716716
to this: Addition is commutative, which means that `add(a, b)` is the same as \`add(b, a).

tests/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LL | | }
3636
| |__- expected `!` because of return type
3737
|
3838
= note: expected type `!`
39-
| found unit type `()`
39+
found unit type `()`
4040
= note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
4141

4242
error: aborting due to 2 previous errors

tests/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ LL | | }
4242
| |__- expected `!` because of return type
4343
|
4444
= note: expected type `!`
45-
| found unit type `()`
45+
found unit type `()`
4646
= note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
4747

4848
error: aborting due to 2 previous errors

tests/ui/associated-inherent-types/issue-109299-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LL | type X = impl for<T> Fn() -> Lexer<T>::Cursor;
2020
| ^^^^^^ associated item not found in `Lexer<T>`
2121
|
2222
= note: the associated type was found for
23-
| - `Lexer<i32>`
23+
- `Lexer<i32>`
2424
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2525

2626
error: unconstrained opaque type

tests/ui/associated-inherent-types/issue-109789.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
1515
|
1616
= note: expected struct `Foo<fn(&'static ())>`
17-
| found struct `Foo<for<'a> fn(&'a ())>`
17+
found struct `Foo<for<'a> fn(&'a ())>`
1818
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1919

2020
error: higher-ranked subtype error

tests/ui/associated-inherent-types/issue-111404-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
1515
|
1616
= note: expected struct `Foo<fn(&())>`
17-
| found struct `Foo<for<'b> fn(&'b ())>`
17+
found struct `Foo<for<'b> fn(&'b ())>`
1818
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1919

2020
error: higher-ranked subtype error

tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | let _low = self.lows.remove(low.identify()).unwrap();
77
| arguments to this method are incorrect
88
|
99
= note: expected reference `&I`
10-
| found associated type `<impl LowT as Identify>::Id`
10+
found associated type `<impl LowT as Identify>::Id`
1111
= help: consider constraining the associated type `<impl LowT as Identify>::Id` to `&I`
1212
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
1313
note: method defined here

tests/ui/associated-types/defaults-specialization.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ LL | fn make() -> Self::Ty { 0u8 }
6868
| expected `<A2<T> as Tr>::Ty` because of return type
6969
|
7070
= note: expected associated type `<A2<T> as Tr>::Ty`
71-
| found type `u8`
71+
found type `u8`
7272
= help: consider constraining the associated type `<A2<T> as Tr>::Ty` to `u8` or calling a method that returns `<A2<T> as Tr>::Ty`
7373
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
7474

tests/ui/associated-types/impl-trait-return-missing-constraint.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | bar()
1111
| ----- return type was inferred to be `impl Bar` here
1212
|
1313
= note: expected associated type `<impl Bar as Foo>::Item`
14-
| found type `i32`
14+
found type `i32`
1515
= help: consider constraining the associated type `<impl Bar as Foo>::Item` to `i32` or calling a method that returns `<impl Bar as Foo>::Item`
1616
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
1717
help: consider constraining the associated type `<impl Bar as Foo>::Item` to `i32`

tests/ui/associated-types/issue-87261.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LL | accepts_trait(b);
2727
| required by a bound introduced by this call
2828
|
2929
= note: expected unit type `()`
30-
| found associated type `<B as Trait>::Associated`
30+
found associated type `<B as Trait>::Associated`
3131
= help: consider constraining the associated type `<B as Trait>::Associated` to `()`
3232
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
3333
note: required by a bound in `accepts_trait`
@@ -65,7 +65,7 @@ LL | accepts_trait(d);
6565
| required by a bound introduced by this call
6666
|
6767
= note: expected unit type `()`
68-
| found associated type `<D as Trait>::Associated`
68+
found associated type `<D as Trait>::Associated`
6969
= help: consider constraining the associated type `<D as Trait>::Associated` to `()`
7070
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
7171
note: required by a bound in `accepts_trait`
@@ -123,7 +123,7 @@ LL | accepts_generic_trait(g);
123123
| required by a bound introduced by this call
124124
|
125125
= note: expected unit type `()`
126-
| found associated type `<G as GenericTrait<()>>::Associated`
126+
found associated type `<G as GenericTrait<()>>::Associated`
127127
= help: consider constraining the associated type `<G as GenericTrait<()>>::Associated` to `()`
128128
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
129129
note: required by a bound in `accepts_generic_trait`
@@ -213,7 +213,7 @@ LL | accepts_trait(returns_opaque_derived_foo());
213213
| required by a bound introduced by this call
214214
|
215215
= note: expected unit type `()`
216-
| found associated type `<impl DerivedTrait + Foo as Trait>::Associated`
216+
found associated type `<impl DerivedTrait + Foo as Trait>::Associated`
217217
= help: consider constraining the associated type `<impl DerivedTrait + Foo as Trait>::Associated` to `()`
218218
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
219219
note: required by a bound in `accepts_trait`
@@ -280,7 +280,7 @@ LL | accepts_generic_trait(returns_opaque_generic_duplicate());
280280
| required by a bound introduced by this call
281281
|
282282
= note: expected unit type `()`
283-
| found associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated`
283+
found associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated`
284284
= help: consider constraining the associated type `<impl GenericTrait<()> + GenericTrait<u8> as GenericTrait<()>>::Associated` to `()`
285285
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
286286
note: required by a bound in `accepts_generic_trait`

0 commit comments

Comments
 (0)