We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 700d697 commit 05dc82aCopy full SHA for 05dc82a
src/test/ui-fulldeps/auxiliary/issue-40001-plugin.rs
@@ -40,7 +40,6 @@ impl<'tcx> LateLintPass<'tcx> for MissingAllowedAttrPass {
40
_: intravisit::FnKind<'tcx>,
41
_: &'tcx hir::FnDecl,
42
_: &'tcx hir::Body,
43
- span: source_map::Span,
44
id: hir::HirId,
45
) {
46
let item = match cx.tcx.hir().get(id) {
@@ -51,6 +50,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingAllowedAttrPass {
51
50
let allowed = |attr| pprust::attribute_to_string(attr).contains("allowed_attr");
52
if !item.attrs.iter().any(allowed) {
53
cx.lint(MISSING_ALLOWED_ATTR, |lint| {
+ let span = cx.tcx.hir().span(id);
54
lint.build("Missing 'allowed_attr' attribute").set_span(span).emit()
55
});
56
}
0 commit comments