Skip to content

Commit 9e1170c

Browse files
committed
Bless test output
1 parent ec037a4 commit 9e1170c

File tree

82 files changed

+739
-102
lines changed

Some content is hidden

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

82 files changed

+739
-102
lines changed

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

+11-1
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,24 @@ LL | #[alloc_error_handler]
2929
LL | // fn oom(
3030
LL | || info: &Layout,
3131
LL | || ) -> ()
32-
| ||_______^ expected `!`, found `()`
32+
| || -^
33+
| ||______||
34+
| | |expected `!`, found `()`
35+
| | help: consider changing oom's return type: `!`
3336
LL | | {
3437
LL | | loop {}
3538
LL | | }
3639
| |__- expected `!` because of return type
3740
|
3841
= note: expected type `!`
3942
found unit type `()`
43+
note: the function oom is defined here
44+
--> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
45+
|
46+
LL | / fn oom(
47+
LL | | info: &Layout,
48+
LL | | ) -> ()
49+
| |_______^
4050
= note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
4151

4252
error: aborting due to 2 previous errors

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,22 @@ LL | #[alloc_error_handler]
3636
LL | // fn oom(
3737
LL | || info: Layout,
3838
LL | || ) {
39-
| ||_^ expected `!`, found `()`
39+
| || ^- help: consider changing oom's return type: `-> !`
40+
| ||_|
41+
| | expected `!`, found `()`
4042
LL | | loop {}
4143
LL | | }
4244
| |__- expected `!` because of return type
4345
|
4446
= note: expected type `!`
4547
found unit type `()`
48+
note: the function oom is defined here
49+
--> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
50+
|
51+
LL | / fn oom(
52+
LL | | info: Layout,
53+
LL | | ) {
54+
| |_^
4655
= note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
4756

4857
error: aborting due to 2 previous errors

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

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
error[E0308]: mismatched types
22
--> $DIR/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs:24:37
33
|
4+
LL | fn identify(&self) -> Self::Id;
5+
| -------- help: consider changing identify's return type: `&I`
6+
...
47
LL | let _low = self.lows.remove(low.identify()).unwrap();
58
| ------ ^^^^^^^^^^^^^^ expected `&I`, found associated type
69
| |
@@ -10,6 +13,11 @@ LL | let _low = self.lows.remove(low.identify()).unwrap();
1013
found associated type `<impl LowT as Identify>::Id`
1114
= help: consider constraining the associated type `<impl LowT as Identify>::Id` to `&I`
1215
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
16+
note: the method identify is defined here
17+
--> $DIR/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs:8:5
18+
|
19+
LL | fn identify(&self) -> Self::Id;
20+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1321
note: method defined here
1422
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
1523

tests/ui/associated-type-bounds/elision.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ LL | fn f(x: &mut dyn Iterator<Item: Iterator<Item = &'_ ()>>) -> Option<&'_ ()>
2121
|
2222
= note: expected enum `Option<&()>`
2323
found enum `Option<impl Iterator<Item = &'_ ()>>`
24+
note: the method next is defined here
25+
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
2426

2527
error: aborting due to 2 previous errors
2628

tests/ui/associated-types/associated-types-eq-3.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@ LL | let _: Bar = x.boo();
88
|
99
= note: expected struct `Bar`
1010
found associated type `<I as Foo>::A`
11+
note: the method boo is defined here
12+
--> $DIR/associated-types-eq-3.rs:6:5
13+
|
14+
LL | fn boo(&self) -> <Self as Foo>::A;
15+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1116
help: consider constraining the associated type `<I as Foo>::A` to `Bar`
1217
|
1318
LL | fn foo2<I: Foo<A = Bar>>(x: I) {
1419
| +++++++++
20+
help: consider changing boo's return type
21+
|
22+
LL | fn boo(&self) -> Bar;
23+
| ~~~
1524

1625
error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
1726
--> $DIR/associated-types-eq-3.rs:38:10

tests/ui/associated-types/associated-types-path-2.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,19 @@ LL | let _: i32 = f2(2i32);
8686
| |
8787
| expected due to this
8888
|
89+
note: the function f2 is defined here
90+
--> $DIR/associated-types-path-2.rs:14:1
91+
|
92+
LL | pub fn f2<T: Foo>(a: T) -> T::A {
93+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8994
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
9095
|
9196
LL | let _: i32 = f2(2i32).try_into().unwrap();
9297
| ++++++++++++++++++++
98+
help: consider changing f2's return type
99+
|
100+
LL | pub fn f2<T: Foo>(a: T) -> i32 {
101+
| ~~~
93102

94103
error: aborting due to 8 previous errors
95104

tests/ui/async-await/coroutine-desc.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ LL | fun(one(), two());
2525
|
2626
= help: consider `await`ing on both `Future`s
2727
= note: distinct uses of `impl Trait` result in different opaque types
28+
note: the function two is defined here
29+
--> $DIR/coroutine-desc.rs:6:1
30+
|
31+
LL | async fn two() {}
32+
| ^^^^^^^^^^^^^^
2833
note: function defined here
2934
--> $DIR/coroutine-desc.rs:8:4
3035
|

tests/ui/async-await/issues/issue-102206.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ LL | std::mem::size_of_val(foo());
66
| |
77
| arguments to this function are incorrect
88
|
9+
note: the function foo is defined here
10+
--> $DIR/issue-102206.rs:3:1
11+
|
12+
LL | async fn foo() {}
13+
| ^^^^^^^^^^^^^^
914
note: function defined here
1015
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
1116
help: consider borrowing here

tests/ui/async-await/suggest-missing-await.stderr

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ note: calling an async function returns a future
3232
|
3333
LL | dummy()
3434
| ^^^^^^^
35+
note: the function dummy is defined here
36+
--> $DIR/suggest-missing-await.rs:18:1
37+
|
38+
LL | async fn dummy() {}
39+
| ^^^^^^^^^^^^^^^^
3540
help: consider `await`ing on the `Future`
3641
|
3742
LL | dummy().await

tests/ui/block-result/unexpected-return-on-unit.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ error[E0308]: mismatched types
44
LL | foo()
55
| ^^^^^ expected `()`, found `usize`
66
|
7+
note: the function foo is defined here
8+
--> $DIR/unexpected-return-on-unit.rs:4:1
9+
|
10+
LL | fn foo() -> usize {
11+
| ^^^^^^^^^^^^^^^^^
712
help: consider using a semicolon here
813
|
914
LL | foo();
@@ -12,6 +17,10 @@ help: try adding a return type
1217
|
1318
LL | fn bar() -> usize {
1419
| ++++++++
20+
help: consider changing foo's return type
21+
|
22+
LL | fn foo() -> () {
23+
| ~~
1524

1625
error: aborting due to 1 previous error
1726

tests/ui/closures/add_semicolon_non_block_closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn foo(_f: impl Fn()) {}
22

3-
fn bar() -> i32 {
3+
fn bar() -> i32 { //~ HELP consider changing bar's return type
44
1
55
}
66

tests/ui/closures/add_semicolon_non_block_closure.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,19 @@ LL | fn main() {
66
LL | foo(|| bar())
77
| ^^^^^ expected `()`, found `i32`
88
|
9+
note: the function bar is defined here
10+
--> $DIR/add_semicolon_non_block_closure.rs:3:1
11+
|
12+
LL | fn bar() -> i32 {
13+
| ^^^^^^^^^^^^^^^
914
help: consider using a semicolon here
1015
|
1116
LL | foo(|| { bar(); })
1217
| + +++
18+
help: consider changing bar's return type
19+
|
20+
LL | fn bar() -> () {
21+
| ~~
1322

1423
error: aborting due to 1 previous error
1524

tests/ui/coercion/retslot-cast.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ LL | -> Option<&Iterator<Item=()>> {
66
...
77
LL | inner(x)
88
| ^^^^^^^^ expected trait `Iterator<Item = ()>`, found trait `Iterator<Item = ()> + Send`
9+
...
10+
LL | -> Option<&(Iterator<Item=()>+Send)> {
11+
| --------------------------------- help: consider changing inner's return type: `Option<&dyn Iterator<Item = ()>>`
912
|
1013
= note: expected enum `Option<&dyn Iterator<Item = ()>>`
1114
found enum `Option<&dyn Iterator<Item = ()> + Send>`
15+
note: the function inner is defined here
16+
--> $DIR/retslot-cast.rs:16:1
17+
|
18+
LL | / pub fn inner(x: Option<&(Iterator<Item=()>+Send)>)
19+
LL | | -> Option<&(Iterator<Item=()>+Send)> {
20+
| |_________________________________________________^
1221

1322
error: aborting due to 1 previous error
1423

tests/ui/const-generics/occurs-check/unify-n-nplusone.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
error[E0308]: mismatched types
22
--> $DIR/unify-n-nplusone.rs:14:11
33
|
4+
LL | fn bind<const N: usize>(value: [u8; N]) -> [u8; N + 1] {
5+
| ----------- help: consider changing bind's return type: `[u8; _]`
6+
...
47
LL | arr = bind(arr);
58
| ^^^^^^^^^ encountered a self-referencing constant
9+
|
10+
note: the function bind is defined here
11+
--> $DIR/unify-n-nplusone.rs:6:1
12+
|
13+
LL | fn bind<const N: usize>(value: [u8; N]) -> [u8; N + 1] {
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
615

716
error: aborting due to 1 previous error
817

tests/ui/const-generics/occurs-check/unused-substs-4.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
error[E0308]: mismatched types
22
--> $DIR/unused-substs-4.rs:10:11
33
|
4+
LL | fn bind<const N: usize>(value: [u8; N]) -> [u8; 3 + 4] {
5+
| ----------- help: consider changing bind's return type: `[u8; _]`
6+
...
47
LL | arr = bind(arr);
58
| ^^^^^^^^^ encountered a self-referencing constant
9+
|
10+
note: the function bind is defined here
11+
--> $DIR/unused-substs-4.rs:4:1
12+
|
13+
LL | fn bind<const N: usize>(value: [u8; N]) -> [u8; 3 + 4] {
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
615

716
error: aborting due to 1 previous error
817

tests/ui/const-generics/occurs-check/unused-substs-5.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ LL | x = q::<_, N>(x);
55
| ^^^^^^^^^^^^- help: try using a conversion method: `.to_vec()`
66
| |
77
| cyclic type of infinite size
8+
|
9+
note: the function q is defined here
10+
--> $DIR/unused-substs-5.rs:5:1
11+
|
12+
LL | fn q<T, const N: usize>(_: T) -> [u8; N + 1] {
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
814

915
error: aborting due to 1 previous error
1016

tests/ui/did_you_mean/compatible-variants.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ struct Foo {
88
}
99

1010
fn f() {}
11+
//~^ HELP consider changing f's return type
1112

1213
fn a() -> Option<()> {
1314
while false {

0 commit comments

Comments
 (0)