File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -879,6 +879,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
879
879
s. is_reserved ( || edition:: LATEST_STABLE_EDITION ) || s. is_weak ( ) || s == sym:: SelfTy
880
880
}
881
881
882
+ // FIXME: This should support attributes with namespace like `diagnostic::do_not_recommend`.
882
883
fn is_builtin_attr ( s : Symbol ) -> bool {
883
884
rustc_feature:: BUILTIN_ATTRIBUTE_MAP . contains_key ( & s)
884
885
}
Original file line number Diff line number Diff line change
1
+ // This is currently not supported but should be!
2
+
3
+ #![ feature( rustdoc_internals) ]
4
+
5
+ #[ doc( attribute = "diagnostic::do_not_recommend" ) ] //~ ERROR
6
+ /// bla
7
+ mod yup { }
Original file line number Diff line number Diff line change
1
+ error: nonexistent builtin attribute `diagnostic::do_not_recommend` used in `#[doc(attribute = "...")]`
2
+ --> $DIR/doc-attribute-unsupported.rs:5:19
3
+ |
4
+ LL | #[doc(attribute = "diagnostic::do_not_recommend")]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = help: only existing builtin attributes are allowed in core/std
8
+
9
+ error: aborting due to 1 previous error
10
+
You can’t perform that action at this time.
0 commit comments