1
Fork 0

Update numeric lifetime test

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2023-02-14 18:17:59 +08:00
parent 380fa26413
commit 98b82aedba
No known key found for this signature in database
GPG key ID: C5FD5D32014FDB47
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
struct S<'1> { s: &'1 usize } struct S<'1> { s: &'1 usize }
//~^ ERROR lifetimes cannot start with a number //~^ ERROR lifetimes or labels cannot start with a number
//~| ERROR lifetimes cannot start with a number //~| ERROR lifetimes or labels cannot start with a number
fn main() { fn main() {
// verify that the parse error doesn't stop type checking // verify that the parse error doesn't stop type checking
let x: usize = ""; let x: usize = "";

View file

@ -6,13 +6,13 @@ LL | let x: usize = "";
| | | |
| expected due to this | expected due to this
error: lifetimes cannot start with a number error: lifetimes or labels cannot start with a number
--> $DIR/numeric-lifetime.rs:1:10 --> $DIR/numeric-lifetime.rs:1:10
| |
LL | struct S<'1> { s: &'1 usize } LL | struct S<'1> { s: &'1 usize }
| ^^ | ^^
error: lifetimes cannot start with a number error: lifetimes or labels cannot start with a number
--> $DIR/numeric-lifetime.rs:1:20 --> $DIR/numeric-lifetime.rs:1:20
| |
LL | struct S<'1> { s: &'1 usize } LL | struct S<'1> { s: &'1 usize }