Skip to content

Commit 66cf18e

Browse files
committed
Update some tests after rebase
1 parent db6a037 commit 66cf18e

2 files changed

Lines changed: 30 additions & 29 deletions

File tree

tests/ui/delegation/glob-glob-conflict.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33

44
trait Trait1 {
55
fn method(&self) -> u8;
6-
//~^ ERROR: this function takes 1 argument but 0 arguments were supplied
7-
//~| ERROR: mismatched types
86
}
97
trait Trait2 {
108
fn method(&self) -> u8;
11-
//~^ ERROR: this function takes 1 argument but 0 arguments were supplied
12-
//~| ERROR: mismatched types
9+
1310
}
1411
trait Trait {
1512
fn method(&self) -> u8;
@@ -28,10 +25,14 @@ impl Trait2 for u8 {
2825
impl Trait for u8 {
2926
reuse Trait1::*;
3027
reuse Trait2::*; //~ ERROR duplicate definitions with name `method`
28+
//~^ ERROR: this function takes 1 argument but 0 arguments were supplied
29+
//~| ERROR: mismatched types
3130
}
3231
impl Trait for u16 {
3332
reuse Trait1::*;
3433
reuse Trait1::*; //~ ERROR duplicate definitions with name `method`
34+
//~^ ERROR: this function takes 1 argument but 0 arguments were supplied
35+
//~| ERROR: mismatched types
3536
}
3637

3738
fn main() {}

tests/ui/delegation/glob-glob-conflict.stderr

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0201]: duplicate definitions with name `method`:
2-
--> $DIR/glob-glob-conflict.rs:30:5
2+
--> $DIR/glob-glob-conflict.rs:27:5
33
|
44
LL | fn method(&self) -> u8;
55
| ----------------------- item in trait
@@ -10,7 +10,7 @@ LL | reuse Trait2::*;
1010
| ^^^^^^^^^^^^^^^^ duplicate definition
1111

1212
error[E0201]: duplicate definitions with name `method`:
13-
--> $DIR/glob-glob-conflict.rs:34:5
13+
--> $DIR/glob-glob-conflict.rs:33:5
1414
|
1515
LL | fn method(&self) -> u8;
1616
| ----------------------- item in trait
@@ -21,35 +21,35 @@ LL | reuse Trait1::*;
2121
| ^^^^^^^^^^^^^^^^ duplicate definition
2222

2323
error[E0061]: this function takes 1 argument but 0 arguments were supplied
24-
--> $DIR/glob-glob-conflict.rs:10:8
24+
--> $DIR/glob-glob-conflict.rs:27:19
2525
|
26-
LL | fn method(&self) -> u8;
27-
| ^^^^^^ argument #1 of type `&_` is missing
26+
LL | reuse Trait2::*;
27+
| ^ argument #1 of type `&_` is missing
2828
|
2929
note: method defined here
30-
--> $DIR/glob-glob-conflict.rs:10:8
30+
--> $DIR/glob-glob-conflict.rs:8:8
3131
|
3232
LL | fn method(&self) -> u8;
3333
| ^^^^^^ ----
3434
help: provide the argument
3535
|
36-
LL | fn method(/* value */)(&self) -> u8;
37-
| +++++++++++++
36+
LL | reuse Trait2::*(/* value */);
37+
| +++++++++++++
3838

3939
error[E0308]: mismatched types
40-
--> $DIR/glob-glob-conflict.rs:10:8
40+
--> $DIR/glob-glob-conflict.rs:27:19
4141
|
42-
LL | fn method(&self) -> u8;
43-
| ^^^^^^- help: consider using a semicolon here: `;`
44-
| |
45-
| expected `()`, found `u8`
46-
| expected `()` because of default return type
42+
LL | reuse Trait2::*;
43+
| ^- help: consider using a semicolon here: `;`
44+
| |
45+
| expected `()`, found `u8`
46+
| expected `()` because of default return type
4747

4848
error[E0061]: this function takes 1 argument but 0 arguments were supplied
49-
--> $DIR/glob-glob-conflict.rs:5:8
49+
--> $DIR/glob-glob-conflict.rs:33:19
5050
|
51-
LL | fn method(&self) -> u8;
52-
| ^^^^^^ argument #1 of type `&_` is missing
51+
LL | reuse Trait1::*;
52+
| ^ argument #1 of type `&_` is missing
5353
|
5454
note: method defined here
5555
--> $DIR/glob-glob-conflict.rs:5:8
@@ -58,17 +58,17 @@ LL | fn method(&self) -> u8;
5858
| ^^^^^^ ----
5959
help: provide the argument
6060
|
61-
LL | fn method(/* value */)(&self) -> u8;
62-
| +++++++++++++
61+
LL | reuse Trait1::*(/* value */);
62+
| +++++++++++++
6363

6464
error[E0308]: mismatched types
65-
--> $DIR/glob-glob-conflict.rs:5:8
65+
--> $DIR/glob-glob-conflict.rs:33:19
6666
|
67-
LL | fn method(&self) -> u8;
68-
| ^^^^^^- help: consider using a semicolon here: `;`
69-
| |
70-
| expected `()`, found `u8`
71-
| expected `()` because of default return type
67+
LL | reuse Trait1::*;
68+
| ^- help: consider using a semicolon here: `;`
69+
| |
70+
| expected `()`, found `u8`
71+
| expected `()` because of default return type
7272

7373
error: aborting due to 6 previous errors
7474

0 commit comments

Comments
 (0)