提交 18f7db3d 编写于 作者: S Scott McMurray

`impl<'_> IceCube<'_> {}` is now only one error in both editions

上级 74df5ec3
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:12:6
|
LL | impl<'_> IceCube<'_> {}
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:17:15
|
LL | struct Struct<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:23:11
|
LL | enum Enum<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:29:13
|
LL | union Union<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:35:13
|
LL | trait Trait<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:40:8
|
LL | fn foo<'_>() {
| ^^ `'_` is a reserved lifetime name
error[E0106]: missing lifetime specifier
--> $DIR/in-binder.rs:12:18
|
LL | impl<'_> IceCube<'_> {}
| ^^ expected lifetime parameter
error: aborting due to 7 previous errors
Some errors occurred: E0106, E0637.
For more information about an error, try `rustc --explain E0106`.
......@@ -2,44 +2,34 @@
//
// Regression test for #52098.
// revisions: Rust2015 Rust2018
//[Rust2018] edition:2018
struct IceCube<'a> {
v: Vec<&'a char>
}
impl<'_> IceCube<'_> {}
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2015]~| ERROR missing lifetime specifier
//[Rust2018]~^^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
struct Struct<'_> {
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
v: Vec<&'static char>
}
enum Enum<'_> {
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
Variant
}
union Union<'_> {
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
a: u32
}
trait Trait<'_> {
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
}
fn foo<'_>() {
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
}
fn main() {}
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:12:6
--> $DIR/in-binder.rs:9:6
|
LL | impl<'_> IceCube<'_> {}
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:17:15
--> $DIR/in-binder.rs:12:15
|
LL | struct Struct<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:23:11
--> $DIR/in-binder.rs:17:11
|
LL | enum Enum<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:29:13
--> $DIR/in-binder.rs:22:13
|
LL | union Union<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:35:13
--> $DIR/in-binder.rs:27:13
|
LL | trait Trait<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:40:8
--> $DIR/in-binder.rs:31:8
|
LL | fn foo<'_>() {
| ^^ `'_` is a reserved lifetime name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册