forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#130551 - nnethercote:fix-break-last-token, …
…r=petrochenkov Fix `break_last_token`. It currently doesn't handle the three-char tokens `>>=` and `<<=` correctly. These can be broken twice, resulting in three individual tokens. This is a latent bug that currently doesn't cause any problems, but does cause problems for rust-lang#124141, because that PR increases the usage of lazy token streams. r? `@petrochenkov`
- Loading branch information
Showing
4 changed files
with
91 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//@ check-pass | ||
|
||
macro_rules! m { | ||
(static $name:ident: $t:ty = $e:expr) => { | ||
let $name: $t = $e; | ||
} | ||
} | ||
|
||
fn main() { | ||
m! { | ||
// Tricky: the trailing `>>=` token here is broken twice: | ||
// - into `>` and `>=` | ||
// - then the `>=` is broken into `>` and `=` | ||
static _x: Vec<Vec<u32>>= vec![] | ||
} | ||
} |