Skip to content

Commit 18f7db3

Browse files
committed
impl<'_> IceCube<'_> {} is now only one error in both editions
1 parent 74df5ec commit 18f7db3

File tree

3 files changed

+12
-68
lines changed

3 files changed

+12
-68
lines changed

Diff for: src/test/ui/underscore-lifetime/in-binder.Rust2015.stderr

-46
This file was deleted.

Diff for: src/test/ui/underscore-lifetime/in-binder.rs

+6-16
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,34 @@
22
//
33
// Regression test for #52098.
44

5-
// revisions: Rust2015 Rust2018
6-
//[Rust2018] edition:2018
7-
85
struct IceCube<'a> {
96
v: Vec<&'a char>
107
}
118

129
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
1611

1712
struct 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

2317
enum 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

2922
union 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

3527
trait Trait<'_> {
36-
//[Rust2015]~^ ERROR `'_` cannot be used here
37-
//[Rust2018]~^^ ERROR `'_` cannot be used here
28+
//~^ ERROR `'_` cannot be used here
3829
}
3930

4031
fn foo<'_>() {
41-
//[Rust2015]~^ ERROR `'_` cannot be used here
42-
//[Rust2018]~^^ ERROR `'_` cannot be used here
32+
//~^ ERROR `'_` cannot be used here
4333
}
4434

4535
fn main() {}

Diff for: src/test/ui/underscore-lifetime/in-binder.Rust2018.stderr renamed to src/test/ui/underscore-lifetime/in-binder.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
error[E0637]: `'_` cannot be used here
2-
--> $DIR/in-binder.rs:12:6
2+
--> $DIR/in-binder.rs:9:6
33
|
44
LL | impl<'_> IceCube<'_> {}
55
| ^^ `'_` is a reserved lifetime name
66

77
error[E0637]: `'_` cannot be used here
8-
--> $DIR/in-binder.rs:17:15
8+
--> $DIR/in-binder.rs:12:15
99
|
1010
LL | struct Struct<'_> {
1111
| ^^ `'_` is a reserved lifetime name
1212

1313
error[E0637]: `'_` cannot be used here
14-
--> $DIR/in-binder.rs:23:11
14+
--> $DIR/in-binder.rs:17:11
1515
|
1616
LL | enum Enum<'_> {
1717
| ^^ `'_` is a reserved lifetime name
1818

1919
error[E0637]: `'_` cannot be used here
20-
--> $DIR/in-binder.rs:29:13
20+
--> $DIR/in-binder.rs:22:13
2121
|
2222
LL | union Union<'_> {
2323
| ^^ `'_` is a reserved lifetime name
2424

2525
error[E0637]: `'_` cannot be used here
26-
--> $DIR/in-binder.rs:35:13
26+
--> $DIR/in-binder.rs:27:13
2727
|
2828
LL | trait Trait<'_> {
2929
| ^^ `'_` is a reserved lifetime name
3030

3131
error[E0637]: `'_` cannot be used here
32-
--> $DIR/in-binder.rs:40:8
32+
--> $DIR/in-binder.rs:31:8
3333
|
3434
LL | fn foo<'_>() {
3535
| ^^ `'_` is a reserved lifetime name

0 commit comments

Comments
 (0)