Eliminate magic numbers from expression precedence
This commit is contained in:
@@ -6,6 +6,7 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::ExitStatus;
|
||||
|
||||
use rustc_abi::TargetDataLayoutErrors;
|
||||
use rustc_ast::util::parser::ExprPrecedence;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_macros::Subdiagnostic;
|
||||
use rustc_span::Span;
|
||||
@@ -298,6 +299,12 @@ impl IntoDiagArg for hir::def::Namespace {
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDiagArg for ExprPrecedence {
|
||||
fn into_diag_arg(self) -> DiagArgValue {
|
||||
DiagArgValue::Number(self as i32)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct DiagSymbolList<S = Symbol>(Vec<S>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user