Skip to content

Commit 75d1e03

Browse files
author
Alexander Regueiro
committed
Fixed more tests.
1 parent b75478b commit 75d1e03

26 files changed

+160
-86
lines changed

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

+4-2
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:16:16
2+
--> $DIR/associated-const-no-item.rs:16: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.stderr

+2-2
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:18:7
2+
--> $DIR/bogus-tag.rs:18:14
33
|
44
LL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), }
55
| ---------- variant `hsl` not found here
66
...
77
LL | color::hsl(h, s, l) => { println!("hsl"); }
8-
| ^^^^^^^^^^^^^^^^^^^ variant not found in `color`
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

+16-8
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:13:9
26+
--> $DIR/bad-assoc-pat.rs:13: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:16:9
34+
--> $DIR/bad-assoc-pat.rs:16: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:19:9
42+
--> $DIR/bad-assoc-pat.rs:19: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:24:10
50+
--> $DIR/bad-assoc-pat.rs:24: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

+4-2
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:14:5
2+
--> $DIR/dont-suggest-private-trait-method.rs:14: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

+10-6
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:32:15
50+
--> $DIR/empty-struct-braces-expr.rs:32: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:33:15
60+
--> $DIR/empty-struct-braces-expr.rs:33: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

+2-2
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:14:15
2+
--> $DIR/E0599.rs:14: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

+4-2
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:12:18
2+
--> $DIR/invalid-path-in-const.rs:12: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

+4-2
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:14:44
2+
--> $DIR/issue-22933-2.rs:14: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

+4-2
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:11:18
2+
--> $DIR/issue-22933-3.rs:11: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

src/test/ui/issues/issue-23173.stderr

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
11
error[E0599]: no variant named `Homura` found for type `Token` in the current scope
2-
--> $DIR/issue-23173.rs:19:16
2+
--> $DIR/issue-23173.rs:19:23
33
|
44
LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
55
| ---------- variant `Homura` not found here
66
...
77
LL | use_token(&Token::Homura);
8-
| ^^^^^^^^^^^^^ variant not found in `Token`
8+
| -------^^^^^^
9+
| |
10+
| variant not found in `Token`
911

1012
error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope
11-
--> $DIR/issue-23173.rs:21:5
13+
--> $DIR/issue-23173.rs:21:13
1214
|
1315
LL | struct Struct {
1416
| ------------- function or associated item `method` not found for this
1517
...
1618
LL | Struct::method();
17-
| ^^^^^^^^^^^^^^ function or associated item not found in `Struct`
19+
| --------^^^^^^
20+
| |
21+
| function or associated item not found in `Struct`
1822

1923
error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope
20-
--> $DIR/issue-23173.rs:23:5
24+
--> $DIR/issue-23173.rs:23:13
2125
|
2226
LL | struct Struct {
2327
| ------------- function or associated item `method` not found for this
2428
...
2529
LL | Struct::method;
26-
| ^^^^^^^^^^^^^^ function or associated item not found in `Struct`
30+
| --------^^^^^^
31+
| |
32+
| function or associated item not found in `Struct`
2733

2834
error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope
29-
--> $DIR/issue-23173.rs:25:5
35+
--> $DIR/issue-23173.rs:25:13
3036
|
3137
LL | struct Struct {
3238
| ------------- associated item `Assoc` not found for this
3339
...
3440
LL | Struct::Assoc;
35-
| ^^^^^^^^^^^^^ associated item not found in `Struct`
41+
| --------^^^^^
42+
| |
43+
| associated item not found in `Struct`
3644

3745
error: aborting due to 4 previous errors
3846

src/test/ui/issues/issue-23217.stderr

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
error[E0599]: no variant named `A` found for type `SomeEnum` in the current scope
2-
--> $DIR/issue-23217.rs:12:9
2+
--> $DIR/issue-23217.rs:12:19
33
|
44
LL | pub enum SomeEnum {
55
| ----------------- variant `A` not found here
66
LL | B = SomeEnum::A,
7-
| ^^^^^^^^^^^ variant not found in `SomeEnum`
7+
| ----------^
8+
| |
9+
| variant not found in `SomeEnum`
810
|
9-
= note: did you mean `SomeEnum::B`?
11+
= help: did you mean `B`?
1012

1113
error: aborting due to previous error
1214

src/test/ui/issues/issue-28344.stderr

+8-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
55
| ^^^^^^^^^^^^^ associated type `Output` must be specified
66

77
error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
8-
--> $DIR/issue-28344.rs:14:17
8+
--> $DIR/issue-28344.rs:14:25
99
|
1010
LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
11-
| ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`
11+
| --------^^^^^
12+
| |
13+
| function or associated item not found in `dyn std::ops::BitXor<_>`
1214
|
1315
= help: did you mean `bitxor`?
1416

@@ -19,10 +21,12 @@ LL | let g = BitXor::bitor;
1921
| ^^^^^^^^^^^^^ associated type `Output` must be specified
2022

2123
error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
22-
--> $DIR/issue-28344.rs:18:13
24+
--> $DIR/issue-28344.rs:18:21
2325
|
2426
LL | let g = BitXor::bitor;
25-
| ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`
27+
| --------^^^^^
28+
| |
29+
| function or associated item not found in `dyn std::ops::BitXor<_>`
2630
|
2731
= help: did you mean `bitxor`?
2832

src/test/ui/issues/issue-28586.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no associated item named `BYTES` found for type `usize` in the current scope
2-
--> $DIR/issue-28586.rs:14:19
2+
--> $DIR/issue-28586.rs:14:26
33
|
44
LL | impl Foo for [u8; usize::BYTES] {}
5-
| ^^^^^^^^^^^^ associated item not found in `usize`
5+
| -------^^^^^
6+
| |
7+
| associated item not found in `usize`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-28971.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0599]: no variant named `Baz` found for type `Foo` in the current scope
2-
--> $DIR/issue-28971.rs:19:13
2+
--> $DIR/issue-28971.rs:19:18
33
|
44
LL | enum Foo {
55
| -------- variant `Baz` not found here
66
...
77
LL | Foo::Baz(..) => (),
8-
| ^^^^^^^^^^^^ variant not found in `Foo`
8+
| -----^^^---- variant not found in `Foo`
99
|
10-
= note: did you mean `Foo::Bar`?
10+
= help: did you mean `Bar`?
1111

1212
error: aborting due to previous error
1313

src/test/ui/issues/issue-30123.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no function or associated item named `new_undirected` found for type `issue_30123_aux::Graph<i32, i32>` in the current scope
2-
--> $DIR/issue-30123.rs:17:14
2+
--> $DIR/issue-30123.rs:17:33
33
|
44
LL | let ug = Graph::<i32, i32>::new_undirected();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `issue_30123_aux::Graph<i32, i32>`
5+
| -------------------^^^^^^^^^^^^^^
6+
| |
7+
| function or associated item not found in `issue_30123_aux::Graph<i32, i32>`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-38919.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no associated item named `Item` found for type `T` in the current scope
2-
--> $DIR/issue-38919.rs:12:5
2+
--> $DIR/issue-38919.rs:12:8
33
|
44
LL | T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope
5-
| ^^^^^^^ associated item not found in `T`
5+
| ---^^^^
6+
| |
7+
| associated item not found in `T`
68

79
error: aborting due to previous error
810

src/test/ui/issues/issue-39559.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
error[E0599]: no function or associated item named `dim` found for type `D` in the current scope
2-
--> $DIR/issue-39559.rs:24:18
2+
--> $DIR/issue-39559.rs:24:21
33
|
44
LL | entries: [T; D::dim()],
5-
| ^^^^^^ function or associated item not found in `D`
5+
| ---^^^
6+
| |
7+
| function or associated item not found in `D`
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 `dim`, perhaps you need to implement it:

src/test/ui/issues/issue-3973.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ LL | | }
88
| |_____^ not a member of trait `ToString_`
99

1010
error[E0599]: no function or associated item named `new` found for type `Point` in the current scope
11-
--> $DIR/issue-3973.rs:32:13
11+
--> $DIR/issue-3973.rs:32:20
1212
|
1313
LL | struct Point {
1414
| ------------ function or associated item `new` not found for this
1515
...
1616
LL | let p = Point::new(0.0, 0.0);
17-
| ^^^^^^^^^^ function or associated item not found in `Point`
17+
| -------^^^
18+
| |
19+
| function or associated item not found in `Point`
1820

1921
error: aborting due to 2 previous errors
2022

src/test/ui/issues/issue-42880.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0599]: no associated item named `String` found for type `std::string::String` in the current scope
2-
--> $DIR/issue-42880.rs:14:15
2+
--> $DIR/issue-42880.rs:14:22
33
|
44
LL | let f = |&Value::String(_)| (); //~ ERROR no associated item named
5-
| ^^^^^^^^^^^^^^^^ associated item not found in `std::string::String`
5+
| -------^^^^^^--- associated item not found in `std::string::String`
66

77
error: aborting due to previous error
88

src/test/ui/issues/issue-7950.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
error[E0599]: no function or associated item named `bar` found for type `Foo` in the current scope
2-
--> $DIR/issue-7950.rs:16:5
2+
--> $DIR/issue-7950.rs:16:10
33
|
44
LL | struct Foo;
55
| ----------- function or associated item `bar` not found for this
66
...
77
LL | Foo::bar();
8-
| ^^^^^^^^ function or associated item not found in `Foo`
8+
| -----^^^
9+
| |
10+
| function or associated item not found in `Foo`
911

1012
error: aborting due to previous error
1113

0 commit comments

Comments
 (0)