Introduce new-style attribute parsers for several attributes
note: compiler compiles but librustdoc and clippy don't
This commit is contained in:
parent
dbd3b7928e
commit
7e0f5b5016
50 changed files with 1519 additions and 1342 deletions
|
@ -8,6 +8,7 @@ use std::process::ExitStatus;
|
|||
use rustc_abi::TargetDataLayoutErrors;
|
||||
use rustc_ast::util::parser::ExprPrecedence;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_attr_data_structures::RustcVersion;
|
||||
use rustc_macros::Subdiagnostic;
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::{Ident, MacroRulesNormalizedIdent, Span, Symbol};
|
||||
|
@ -96,6 +97,12 @@ into_diag_arg_using_display!(
|
|||
rustc_abi::ExternAbi,
|
||||
);
|
||||
|
||||
impl IntoDiagArg for RustcVersion {
|
||||
fn into_diag_arg(self) -> DiagArgValue {
|
||||
DiagArgValue::Str(Cow::Owned(self.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::TraitRef<I> {
|
||||
fn into_diag_arg(self) -> DiagArgValue {
|
||||
self.to_string().into_diag_arg()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue