Skip to content

Commit 58a5756

Browse files
author
Alexander Regueiro
committed
Fixed more tests.
1 parent b9326f7 commit 58a5756

27 files changed

+164
-90
lines changed

src/test/ui/associated-const/associated-const-no-item.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no associated item named `ID` found for type `i32` in the current scope
2-
--> $DIR/associated-const-no-item.rs:5:16
2+
--> $DIR/associated-const-no-item.rs:5:23
33
|
44
LL | const X: i32 = <i32>::ID;
5-
| ^^^^^^^^^ associated item not found in `i32`
5+
| -------^^
6+
| |
7+
| associated item not found in `i32`
68
|
79
= help: items from traits can only be used if the trait is implemented and in scope
810
= note: the following trait defines an item `ID`, perhaps you need to implement it:

src/test/ui/bogus-tag.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
33
fn main() {
44
let red: Color = Color::Rgb(255, 0, 0);
55
match red {
6-
Color::Rgb(r, g, b) => { println!("rgb"); }
7-
Color::Hsl(h, s, l) => { println!("hsl"); }
8-
//~^ ERROR no variant
6+
Color::Rgb(r, g, b) => { println!("rgb"); }
7+
Color::Hsl(h, s, l) => { println!("hsl"); }
8+
//~^ ERROR no variant
99
}
1010
}

src/test/ui/bogus-tag.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0599]: no variant named `Hsl` found for type `Color` in the current scope
2-
--> $DIR/bogus-tag.rs:7:7
2+
--> $DIR/bogus-tag.rs:7:9
33
|
44
LL | enum Color { Rgb(isize, isize, isize), Rgba(isize, isize, isize, isize), }
55
| ---------- variant `Hsl` not found here
66
...
7-
LL | Color::Hsl(h, s, l) => { println!("hsl"); }
8-
| ^^^^^^^^^^^^^^^^^^^ variant not found in `Color`
7+
LL | Color::Hsl(h, s, l) => { println!("hsl"); }
8+
| ^^^^^^^^^^^^^^^^^^^ variant not found in `Color`
99

1010
error: aborting due to previous error
1111

src/test/ui/did_you_mean/bad-assoc-pat.stderr

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,36 @@ LL | &(u8,)::AssocItem => {}
2323
| ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem`
2424

2525
error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope
26-
--> $DIR/bad-assoc-pat.rs:3:9
26+
--> $DIR/bad-assoc-pat.rs:3:15
2727
|
2828
LL | [u8]::AssocItem => {}
29-
| ^^^^^^^^^^^^^^^ associated item not found in `[u8]`
29+
| ------^^^^^^^^^
30+
| |
31+
| associated item not found in `[u8]`
3032

3133
error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope
32-
--> $DIR/bad-assoc-pat.rs:6:9
34+
--> $DIR/bad-assoc-pat.rs:6:19
3335
|
3436
LL | (u8, u8)::AssocItem => {}
35-
| ^^^^^^^^^^^^^^^^^^^ associated item not found in `(u8, u8)`
37+
| ----------^^^^^^^^^
38+
| |
39+
| associated item not found in `(u8, u8)`
3640

3741
error[E0599]: no associated item named `AssocItem` found for type `_` in the current scope
38-
--> $DIR/bad-assoc-pat.rs:9:9
42+
--> $DIR/bad-assoc-pat.rs:9:12
3943
|
4044
LL | _::AssocItem => {}
41-
| ^^^^^^^^^^^^ associated item not found in `_`
45+
| ---^^^^^^^^^
46+
| |
47+
| associated item not found in `_`
4248

4349
error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope
44-
--> $DIR/bad-assoc-pat.rs:14:10
50+
--> $DIR/bad-assoc-pat.rs:14:17
4551
|
4652
LL | &(u8,)::AssocItem => {}
47-
| ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)`
53+
| -------^^^^^^^^^
54+
| |
55+
| associated item not found in `(u8,)`
4856

4957
error: aborting due to 8 previous errors
5058

src/test/ui/dont-suggest-private-trait-method.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
error[E0599]: no function or associated item named `new` found for type `T` in the current scope
2-
--> $DIR/dont-suggest-private-trait-method.rs:4:5
2+
--> $DIR/dont-suggest-private-trait-method.rs:4:8
33
|
44
LL | struct T;
55
| --------- function or associated item `new` not found for this
66
...
77
LL | T::new();
8-
| ^^^^^^ function or associated item not found in `T`
8+
| ---^^^
9+
| |
10+
| function or associated item not found in `T`
911

1012
error: aborting due to previous error
1113

src/test/ui/empty/empty-struct-braces-expr.stderr

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,24 @@ LL | let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1
4747
| did you mean `XEmpty1 { /* fields */ }`?
4848

4949
error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope
50-
--> $DIR/empty-struct-braces-expr.rs:22:15
50+
--> $DIR/empty-struct-braces-expr.rs:22:19
5151
|
5252
LL | let xe3 = XE::Empty3; //~ ERROR no variant named `Empty3` found for type
53-
| ^^^^^^^^^^ variant not found in `empty_struct::XE`
53+
| ----^^^^^^
54+
| |
55+
| variant not found in `empty_struct::XE`
5456
|
55-
= note: did you mean `empty_struct::XE::XEmpty3`?
57+
= help: did you mean `XEmpty3`?
5658

5759
error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope
58-
--> $DIR/empty-struct-braces-expr.rs:23:15
60+
--> $DIR/empty-struct-braces-expr.rs:23:19
5961
|
6062
LL | let xe3 = XE::Empty3(); //~ ERROR no variant named `Empty3` found for type
61-
| ^^^^^^^^^^ variant not found in `empty_struct::XE`
63+
| ----^^^^^^
64+
| |
65+
| variant not found in `empty_struct::XE`
6266
|
63-
= note: did you mean `empty_struct::XE::XEmpty3`?
67+
= help: did you mean `XEmpty3`?
6468

6569
error: aborting due to 8 previous errors
6670

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope
2-
--> $DIR/E0599.rs:4:15
2+
--> $DIR/E0599.rs:4:20
33
|
44
LL | struct Foo;
55
| ----------- associated item `NotEvenReal` not found for this
66
...
77
LL | || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599
8-
| ^^^^^^^^^^^^^^^^^^ associated item not found in `Foo`
8+
| -----^^^^^^^^^^^-- associated item not found in `Foo`
99

1010
error: aborting due to previous error
1111

src/test/ui/invalid/invalid-path-in-const.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope
2-
--> $DIR/invalid-path-in-const.rs:2:18
2+
--> $DIR/invalid-path-in-const.rs:2:23
33
|
44
LL | fn f(a: [u8; u32::DOESNOTEXIST]) {}
5-
| ^^^^^^^^^^^^^^^^^ associated item not found in `u32`
5+
| -----^^^^^^^^^^^^
6+
| |
7+
| associated item not found in `u32`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-22933-2.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope
2-
--> $DIR/issue-22933-2.rs:4:44
2+
--> $DIR/issue-22933-2.rs:4:55
33
|
44
LL | enum Delicious {
55
| -------------- variant `PIE` not found here
66
...
77
LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize,
8-
| ^^^^^^^^^^^^^^ variant not found in `Delicious`
8+
| -----------^^^
9+
| |
10+
| variant not found in `Delicious`
911

1012
error: aborting due to previous error
1113

src/test/ui/issues/issue-22933-3.stderr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no associated item named `MIN` found for type `u8` in the current scope
2-
--> $DIR/issue-22933-3.rs:1:18
2+
--> $DIR/issue-22933-3.rs:1:22
33
|
44
LL | const FOO: [u32; u8::MIN as usize] = [];
5-
| ^^^^^^^ associated item not found in `u8`
5+
| ----^^^
6+
| |
7+
| associated item not found in `u8`
68

79
error: aborting due to previous error
810

0 commit comments

Comments
 (0)