Skip to content

Commit 9d4ba5b

Browse files
Clean up code
1 parent 2493227 commit 9d4ba5b

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

compiler/rustc_attr_parsing/src/attributes/doc.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// FIXME: to be removed
2-
#![allow(unused_imports)]
3-
41
use rustc_ast::ast::{AttrStyle, LitKind, MetaItemLit};
52
use rustc_feature::template;
63
use rustc_hir::attrs::{
@@ -13,7 +10,6 @@ use thin_vec::ThinVec;
1310
use super::prelude::{Allow, AllowedTargets, Error, MethodKind, Target};
1411
use super::{AcceptMapping, AttributeParser};
1512
use crate::context::{AcceptContext, FinalizeContext, Stage};
16-
use crate::fluent_generated as fluent;
1713
use crate::parser::{ArgParser, MetaItemOrLitParser, MetaItemParser, PathParser};
1814
use crate::session_diagnostics::{
1915
DocAliasBadChar, DocAliasEmpty, DocAliasMalformed, DocAliasStartEnd, DocAttributeNotAttribute,
@@ -355,6 +351,8 @@ impl DocParser {
355351

356352
// FIXME: It's errorring when the attribute is passed multiple times on the command
357353
// line.
354+
// The right fix for this would be to only check this rule if the attribute is
355+
// not set on the command line but directly in the code.
358356
// if self.attribute.$ident.is_some() {
359357
// cx.duplicate_key(path.span(), path.word_sym().unwrap());
360358
// return;

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ attribute_parsers!(
164164
ConstStabilityParser,
165165
DocParser,
166166
MacroUseParser,
167-
168167
NakedParser,
169168
StabilityParser,
170169
UsedParser,

compiler/rustc_attr_parsing/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@
7878
7979
// tidy-alphabetical-start
8080
#![feature(decl_macro)]
81-
#![recursion_limit = "256"]
82-
// tidy-alphabetical-end
8381
#![feature(if_let_guard)]
8482
#![feature(iter_intersperse)]
83+
#![recursion_limit = "256"]
84+
// tidy-alphabetical-end
8585

8686
#[macro_use]
8787
/// All the individual attribute parsers for each of rustc's built-in attributes.

0 commit comments

Comments
 (0)