forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Auto merge of rust-lang#133305 - cuviper:beta-next, r=cuviper
[beta] backports - Enforce that raw lifetimes must be valid raw identifiers rust-lang#132363 - Update cdb annotations for some debuginfo tests with cdb `10.0.26100.2161` rust-lang#133115 r? cuviper
Showing
8 changed files
with
127 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//@ edition: 2021 | ||
|
||
// Reject raw lifetimes with identifier parts that wouldn't be valid raw identifiers. | ||
|
||
macro_rules! w { | ||
($tt:tt) => {}; | ||
} | ||
|
||
w!('r#_); | ||
//~^ ERROR `_` cannot be a raw lifetime | ||
w!('r#self); | ||
//~^ ERROR `self` cannot be a raw lifetime | ||
w!('r#super); | ||
//~^ ERROR `super` cannot be a raw lifetime | ||
w!('r#Self); | ||
//~^ ERROR `Self` cannot be a raw lifetime | ||
w!('r#crate); | ||
//~^ ERROR `crate` cannot be a raw lifetime | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
error: `_` cannot be a raw lifetime | ||
--> $DIR/raw-lt-invalid-raw-id.rs:9:4 | ||
| | ||
LL | w!('r#_); | ||
| ^^^^ | ||
|
||
error: `self` cannot be a raw lifetime | ||
--> $DIR/raw-lt-invalid-raw-id.rs:11:4 | ||
| | ||
LL | w!('r#self); | ||
| ^^^^^^^ | ||
|
||
error: `super` cannot be a raw lifetime | ||
--> $DIR/raw-lt-invalid-raw-id.rs:13:4 | ||
| | ||
LL | w!('r#super); | ||
| ^^^^^^^^ | ||
|
||
error: `Self` cannot be a raw lifetime | ||
--> $DIR/raw-lt-invalid-raw-id.rs:15:4 | ||
| | ||
LL | w!('r#Self); | ||
| ^^^^^^^ | ||
|
||
error: `crate` cannot be a raw lifetime | ||
--> $DIR/raw-lt-invalid-raw-id.rs:17:4 | ||
| | ||
LL | w!('r#crate); | ||
| ^^^^^^^^ | ||
|
||
error: aborting due to 5 previous errors | ||
|