Clean up code

This commit is contained in:
Guillaume Gomez 2025-12-05 23:13:09 +01:00
parent 348d9d98e0
commit 8d4f59bed7
3 changed files with 4 additions and 7 deletions

View file

@ -1,6 +1,3 @@
// FIXME: to be removed
#![allow(unused_imports)]
use rustc_ast::ast::{AttrStyle, LitKind, MetaItemLit};
use rustc_feature::template;
use rustc_hir::attrs::{
@ -13,7 +10,6 @@ use thin_vec::ThinVec;
use super::prelude::{Allow, AllowedTargets, Error, MethodKind, Target};
use super::{AcceptMapping, AttributeParser};
use crate::context::{AcceptContext, FinalizeContext, Stage};
use crate::fluent_generated as fluent;
use crate::parser::{ArgParser, MetaItemOrLitParser, MetaItemParser, PathParser};
use crate::session_diagnostics::{
DocAliasBadChar, DocAliasEmpty, DocAliasMalformed, DocAliasStartEnd, DocAttributeNotAttribute,
@ -355,6 +351,8 @@ impl DocParser {
// FIXME: It's errorring when the attribute is passed multiple times on the command
// line.
// The right fix for this would be to only check this rule if the attribute is
// not set on the command line but directly in the code.
// if self.attribute.$ident.is_some() {
// cx.duplicate_key(path.span(), path.word_sym().unwrap());
// return;

View file

@ -165,7 +165,6 @@ attribute_parsers!(
ConstStabilityParser,
DocParser,
MacroUseParser,
NakedParser,
StabilityParser,
UsedParser,

View file

@ -78,10 +78,10 @@
// tidy-alphabetical-start
#![feature(decl_macro)]
#![recursion_limit = "256"]
// tidy-alphabetical-end
#![feature(if_let_guard)]
#![feature(iter_intersperse)]
#![recursion_limit = "256"]
// tidy-alphabetical-end
#[macro_use]
/// All the individual attribute parsers for each of rustc's built-in attributes.