feature gate doc(primitive)
This commit is contained in:
parent
2bd17c1d43
commit
03df65497e
9 changed files with 49 additions and 7 deletions
|
@ -794,9 +794,24 @@ impl CheckAttrVisitor<'tcx> {
|
|||
| sym::notable_trait
|
||||
| sym::passes
|
||||
| sym::plugins
|
||||
| sym::primitive
|
||||
| sym::test => {}
|
||||
|
||||
sym::primitive => {
|
||||
if !self.tcx.features().doc_primitive {
|
||||
self.tcx.struct_span_lint_hir(
|
||||
INVALID_DOC_ATTRIBUTES,
|
||||
hir_id,
|
||||
i_meta.span,
|
||||
|lint| {
|
||||
let mut diag = lint.build(
|
||||
"`doc(primitive)` should never have been stable",
|
||||
);
|
||||
diag.emit();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_ => {
|
||||
self.tcx.struct_span_lint_hir(
|
||||
INVALID_DOC_ATTRIBUTES,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue