Skip to content

Commit 37ca219

Browse files
wip
1 parent f309805 commit 37ca219

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

compiler/rustc_attr_parsing/src/attributes/deprecation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<S: Stage> SingleAttributeParser<S> for DeprecationParser {
5858
Allow(Target::AssocTy),
5959
Allow(Target::AssocConst),
6060
Allow(Target::Variant),
61-
Allow(Target::Impl { of_trait: false }), //TODO what does that even do?
61+
Allow(Target::Impl { of_trait: false }), //FIXME This does not make sense
6262
Error(Target::WherePredicate),
6363
]);
6464
const TEMPLATE: AttributeTemplate = template!(

compiler/rustc_attr_parsing/src/attributes/link_attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub(crate) struct ExportStableParser;
7171
impl<S: Stage> NoArgsAttributeParser<S> for ExportStableParser {
7272
const PATH: &[Symbol] = &[sym::export_stable];
7373
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
74-
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll; //TODO
74+
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll; //FIXME Still checked fully in `check_attr.rs`
7575
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::ExportStable;
7676
}
7777

compiler/rustc_attr_parsing/src/attributes/repr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ impl<S: Stage> CombineAttributeParser<S> for ReprParser {
6060
reprs
6161
}
6262

63-
//TODO should be done here in the future, argument-dependent
63+
//FIXME Still checked fully in `check_attr.rs`
64+
//This one is slightly more complicated because the allowed targets depend on the arguments
6465
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll;
6566
}
6667

@@ -327,7 +328,6 @@ impl<S: Stage> AttributeParser<S> for AlignParser {
327328
Allow(Target::Method(MethodKind::TraitImpl)),
328329
Allow(Target::Method(MethodKind::Trait { body: false })),
329330
Allow(Target::ForeignFn),
330-
// TODO special error for struct,enum,union
331331
]);
332332

333333
fn finalize(self, _cx: &FinalizeContext<'_, '_, S>) -> Option<AttributeKind> {

compiler/rustc_attr_parsing/src/attributes/semantics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ pub(crate) struct MayDangleParser;
77
impl<S: Stage> NoArgsAttributeParser<S> for MayDangleParser {
88
const PATH: &[Symbol] = &[sym::may_dangle];
99
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
10-
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll; //TODO
10+
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll; //FIXME Still checked fully in `check_attr.rs`
1111
const CREATE: fn(span: Span) -> AttributeKind = AttributeKind::MayDangle;
1212
}

compiler/rustc_attr_parsing/src/attributes/stability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
4141
Allow(Target::MacroDef),
4242
Allow(Target::Crate),
4343
Allow(Target::Mod),
44-
Allow(Target::Use), // TODO I don't think this does anything?
44+
Allow(Target::Use), // FIXME I don't think this does anything?
4545
Allow(Target::Const),
4646
Allow(Target::AssocConst),
4747
Allow(Target::AssocTy),

compiler/rustc_attr_parsing/src/attributes/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,6 @@ pub(crate) struct PointeeParser;
172172
impl<S: Stage> NoArgsAttributeParser<S> for PointeeParser {
173173
const PATH: &[Symbol] = &[sym::pointee];
174174
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
175-
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll; //TODO
175+
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowAll; //FIXME Still checked fully in `check_attr.rs`
176176
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Pointee;
177177
}

compiler/rustc_passes/src/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
220220
| AttributeKind::ParenSugar(..)
221221
| AttributeKind::AllowIncoherentImpl(..)
222222
| AttributeKind::Confusables { .. }
223-
// #[doc]` is actually a lot more than just doc comments, so is checked below
223+
// `#[doc]` is actually a lot more than just doc comments, so is checked below
224224
| AttributeKind::DocComment {..}
225225
// handled below this loop and elsewhere
226226
| AttributeKind::Repr { .. }

0 commit comments

Comments
 (0)