diff options
| author | bors <bors@rust-lang.org> | 2015-04-25 21:44:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-25 21:44:50 +0000 |
| commit | 00c48d3779fb4c372d2dfe7a8654c6cd1e065511 (patch) | |
| tree | b0e0c2156d8874ecaad57c16c20d9336e8a7f69c /src/libsyntax/parse/token.rs | |
| parent | 0d8309ec0b13ebad02bbc76f93eff39edf4af2d0 (diff) | |
| parent | 0ad48e41c1b1eb6386449254258603eab7d91620 (diff) | |
Auto merge of #24547 - bombless:comma, r=pnkfelix
Closes #20616 It breaks code such as <https://github.com/rust-lang/rust/blob/c64feb63418fd05bd6e5adc6f9ad763aa6a594b1/src/librustc_typeck/check/method/suggest.rs#L367>, so this is a [breaking-change], you have to add missing comma after the last lifetime arguement now.
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 538aa384327..e33b1391a10 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -173,6 +173,14 @@ pub enum Token { } impl Token { + /// Returns `true` if the token starts with '>'. + pub fn is_like_gt(&self) -> bool { + match *self { + BinOp(Shr) | BinOpEq(Shr) | Gt | Ge => true, + _ => false, + } + } + /// Returns `true` if the token can appear at the start of an expression. pub fn can_begin_expr(&self) -> bool { match *self { |
