Auto merge of #24547 - bombless:comma, r=pnkfelix
Closes #20616
It breaks code such as <c64feb6341/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.
This commit is contained in:
commit
00c48d3779
13 changed files with 507 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue