File tree Expand file tree Collapse file tree 3 files changed +12
-68
lines changed
src/test/ui/underscore-lifetime Expand file tree Collapse file tree 3 files changed +12
-68
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22//
33// Regression test for #52098.
44
5- // revisions: Rust2015 Rust2018
6- //[Rust2018] edition:2018
7-
85struct IceCube < ' a > {
96 v : Vec < & ' a char >
107}
118
129impl < ' _ > 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
1611
1712struct Struct < ' _ > {
18- //[Rust2015]~^ ERROR `'_` cannot be used here
19- //[Rust2018]~^^ ERROR `'_` cannot be used here
13+ //~^ ERROR `'_` cannot be used here
2014 v : Vec < & ' static char >
2115}
2216
2317enum Enum < ' _ > {
24- //[Rust2015]~^ ERROR `'_` cannot be used here
25- //[Rust2018]~^^ ERROR `'_` cannot be used here
18+ //~^ ERROR `'_` cannot be used here
2619 Variant
2720}
2821
2922union Union < ' _ > {
30- //[Rust2015]~^ ERROR `'_` cannot be used here
31- //[Rust2018]~^^ ERROR `'_` cannot be used here
23+ //~^ ERROR `'_` cannot be used here
3224 a : u32
3325}
3426
3527trait Trait < ' _ > {
36- //[Rust2015]~^ ERROR `'_` cannot be used here
37- //[Rust2018]~^^ ERROR `'_` cannot be used here
28+ //~^ ERROR `'_` cannot be used here
3829}
3930
4031fn foo < ' _ > ( ) {
41- //[Rust2015]~^ ERROR `'_` cannot be used here
42- //[Rust2018]~^^ ERROR `'_` cannot be used here
32+ //~^ ERROR `'_` cannot be used here
4333}
4434
4535fn main ( ) { }
Original file line number Diff line number Diff line change 11error[E0637]: `'_` cannot be used here
2- --> $DIR/in-binder.rs:12 :6
2+ --> $DIR/in-binder.rs:9 :6
33 |
44LL | impl<'_> IceCube<'_> {}
55 | ^^ `'_` is a reserved lifetime name
66
77error[E0637]: `'_` cannot be used here
8- --> $DIR/in-binder.rs:17 :15
8+ --> $DIR/in-binder.rs:12 :15
99 |
1010LL | struct Struct<'_> {
1111 | ^^ `'_` is a reserved lifetime name
1212
1313error[E0637]: `'_` cannot be used here
14- --> $DIR/in-binder.rs:23 :11
14+ --> $DIR/in-binder.rs:17 :11
1515 |
1616LL | enum Enum<'_> {
1717 | ^^ `'_` is a reserved lifetime name
1818
1919error[E0637]: `'_` cannot be used here
20- --> $DIR/in-binder.rs:29 :13
20+ --> $DIR/in-binder.rs:22 :13
2121 |
2222LL | union Union<'_> {
2323 | ^^ `'_` is a reserved lifetime name
2424
2525error[E0637]: `'_` cannot be used here
26- --> $DIR/in-binder.rs:35 :13
26+ --> $DIR/in-binder.rs:27 :13
2727 |
2828LL | trait Trait<'_> {
2929 | ^^ `'_` is a reserved lifetime name
3030
3131error[E0637]: `'_` cannot be used here
32- --> $DIR/in-binder.rs:40 :8
32+ --> $DIR/in-binder.rs:31 :8
3333 |
3434LL | fn foo<'_>() {
3535 | ^^ `'_` is a reserved lifetime name
You can’t perform that action at this time.
0 commit comments