File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 3 files changed +19
-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
+ #[ doc( attribute = "diagnostic::do_not_recommend" ) ] //~ ERROR
4
+ /// bla
5
+ mod yup { }
Original file line number Diff line number Diff line change
1
+ error[E0658]: `#[doc(attribute)]` is meant for internal use only
2
+ --> $DIR/doc-attribute-unsupported.rs:3:1
3
+ |
4
+ LL | #[doc(attribute = "diagnostic::do_not_recommend")]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: see issue #90418 <https://github.com/rust-lang/rust/issues/90418> for more information
8
+ = help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable
9
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
+
11
+ error: aborting due to 1 previous error
12
+
13
+ For more information about this error, try `rustc --explain E0658`.
You can’t perform that action at this time.
0 commit comments