File tree 4 files changed +10
-10
lines changed
4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ struct Bar {}
5
5
impl Foo {
6
6
fn foo ( ) {
7
7
let _ = Self ;
8
- //~^ ERROR the `Self` constructor can only be used with tuple structs
8
+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
9
9
let _ = Self ( ) ;
10
- //~^ ERROR the `Self` constructor can only be used with tuple structs
10
+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
11
11
}
12
12
}
13
13
14
14
impl Bar {
15
15
fn bar ( ) {
16
16
let _ = Self ;
17
- //~^ ERROR the `Self` constructor can only be used with tuple structs
17
+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
18
18
let _ = Self ( ) ;
19
- //~^ ERROR the `Self` constructor can only be used with tuple structs
19
+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
20
20
}
21
21
}
22
22
Original file line number Diff line number Diff line change 1
- error: the `Self` constructor can only be used with tuple structs
1
+ error: the `Self` constructor can only be used with tuple or unit structs
2
2
--> $DIR/issue-56199.rs:7:17
3
3
|
4
4
LL | let _ = Self;
5
5
| ^^^^
6
6
|
7
7
= note: did you mean to use one of the enum's variants?
8
8
9
- error: the `Self` constructor can only be used with tuple structs
9
+ error: the `Self` constructor can only be used with tuple or unit structs
10
10
--> $DIR/issue-56199.rs:9:17
11
11
|
12
12
LL | let _ = Self();
13
13
| ^^^^
14
14
|
15
15
= note: did you mean to use one of the enum's variants?
16
16
17
- error: the `Self` constructor can only be used with tuple structs
17
+ error: the `Self` constructor can only be used with tuple or unit structs
18
18
--> $DIR/issue-56199.rs:16:17
19
19
|
20
20
LL | let _ = Self;
21
21
| ^^^^ did you mean `Self { /* fields */ }`?
22
22
23
- error: the `Self` constructor can only be used with tuple structs
23
+ error: the `Self` constructor can only be used with tuple or unit structs
24
24
--> $DIR/issue-56199.rs:18:17
25
25
|
26
26
LL | let _ = Self();
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pub struct Foo {}
3
3
4
4
impl Foo {
5
5
fn bar ( Self ( foo) : Self ) { }
6
- //~^ ERROR the `Self` constructor can only be used with tuple structs
6
+ //~^ ERROR the `Self` constructor can only be used with tuple or unit structs
7
7
//~^^ ERROR expected tuple struct/variant, found self constructor `Self` [E0164]
8
8
}
9
9
Original file line number Diff line number Diff line change 1
- error: the `Self` constructor can only be used with tuple structs
1
+ error: the `Self` constructor can only be used with tuple or unit structs
2
2
--> $DIR/issue-56835.rs:5:12
3
3
|
4
4
LL | fn bar(Self(foo): Self) {}
You can’t perform that action at this time.
0 commit comments