Eliminate magic numbers from expression precedence
This commit is contained in:
parent
539c863eaf
commit
7ced18f329
18 changed files with 162 additions and 138 deletions
|
@ -3,6 +3,7 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use rustc_ast::token::Token;
|
||||
use rustc_ast::util::parser::ExprPrecedence;
|
||||
use rustc_ast::{Path, Visibility};
|
||||
use rustc_errors::codes::*;
|
||||
use rustc_errors::{
|
||||
|
@ -2686,7 +2687,7 @@ pub(crate) struct UnexpectedExpressionInPattern {
|
|||
/// Was a `RangePatternBound` expected?
|
||||
pub is_bound: bool,
|
||||
/// The unexpected expr's precedence (used in match arm guard suggestions).
|
||||
pub expr_precedence: i8,
|
||||
pub expr_precedence: ExprPrecedence,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue