File tree 3 files changed +12
-68
lines changed
src/test/ui/underscore-lifetime
3 files changed +12
-68
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
//
3
3
// Regression test for #52098.
4
4
5
- // revisions: Rust2015 Rust2018
6
- //[Rust2018] edition:2018
7
-
8
5
struct IceCube < ' a > {
9
6
v : Vec < & ' a char >
10
7
}
11
8
12
9
impl < ' _ > IceCube < ' _ > { }
13
- //[Rust2015]~^ ERROR `'_` cannot be used here
14
- //[Rust2015]~| ERROR missing lifetime specifier
15
- //[Rust2018]~^^^ ERROR `'_` cannot be used here
10
+ //~^ ERROR `'_` cannot be used here
16
11
17
12
struct Struct < ' _ > {
18
- //[Rust2015]~^ ERROR `'_` cannot be used here
19
- //[Rust2018]~^^ ERROR `'_` cannot be used here
13
+ //~^ ERROR `'_` cannot be used here
20
14
v : Vec < & ' static char >
21
15
}
22
16
23
17
enum Enum < ' _ > {
24
- //[Rust2015]~^ ERROR `'_` cannot be used here
25
- //[Rust2018]~^^ ERROR `'_` cannot be used here
18
+ //~^ ERROR `'_` cannot be used here
26
19
Variant
27
20
}
28
21
29
22
union Union < ' _ > {
30
- //[Rust2015]~^ ERROR `'_` cannot be used here
31
- //[Rust2018]~^^ ERROR `'_` cannot be used here
23
+ //~^ ERROR `'_` cannot be used here
32
24
a : u32
33
25
}
34
26
35
27
trait Trait < ' _ > {
36
- //[Rust2015]~^ ERROR `'_` cannot be used here
37
- //[Rust2018]~^^ ERROR `'_` cannot be used here
28
+ //~^ ERROR `'_` cannot be used here
38
29
}
39
30
40
31
fn foo < ' _ > ( ) {
41
- //[Rust2015]~^ ERROR `'_` cannot be used here
42
- //[Rust2018]~^^ ERROR `'_` cannot be used here
32
+ //~^ ERROR `'_` cannot be used here
43
33
}
44
34
45
35
fn main ( ) { }
Original file line number Diff line number Diff line change 1
1
error[E0637]: `'_` cannot be used here
2
- --> $DIR/in-binder.rs:12 :6
2
+ --> $DIR/in-binder.rs:9 :6
3
3
|
4
4
LL | impl<'_> IceCube<'_> {}
5
5
| ^^ `'_` is a reserved lifetime name
6
6
7
7
error[E0637]: `'_` cannot be used here
8
- --> $DIR/in-binder.rs:17 :15
8
+ --> $DIR/in-binder.rs:12 :15
9
9
|
10
10
LL | struct Struct<'_> {
11
11
| ^^ `'_` is a reserved lifetime name
12
12
13
13
error[E0637]: `'_` cannot be used here
14
- --> $DIR/in-binder.rs:23 :11
14
+ --> $DIR/in-binder.rs:17 :11
15
15
|
16
16
LL | enum Enum<'_> {
17
17
| ^^ `'_` is a reserved lifetime name
18
18
19
19
error[E0637]: `'_` cannot be used here
20
- --> $DIR/in-binder.rs:29 :13
20
+ --> $DIR/in-binder.rs:22 :13
21
21
|
22
22
LL | union Union<'_> {
23
23
| ^^ `'_` is a reserved lifetime name
24
24
25
25
error[E0637]: `'_` cannot be used here
26
- --> $DIR/in-binder.rs:35 :13
26
+ --> $DIR/in-binder.rs:27 :13
27
27
|
28
28
LL | trait Trait<'_> {
29
29
| ^^ `'_` is a reserved lifetime name
30
30
31
31
error[E0637]: `'_` cannot be used here
32
- --> $DIR/in-binder.rs:40 :8
32
+ --> $DIR/in-binder.rs:31 :8
33
33
|
34
34
LL | fn foo<'_>() {
35
35
| ^^ `'_` is a reserved lifetime name
You can’t perform that action at this time.
0 commit comments