@@ -147,6 +147,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
147
147
| AttributeKind :: ConstStabilityIndirect
148
148
| AttributeKind :: MacroTransparency ( _) ,
149
149
) => { /* do nothing */ }
150
+ Attribute :: Parsed ( AttributeKind :: MayDangle ( _) ) => {
151
+ self . check_may_dangle ( hir_id, attr)
152
+ }
150
153
Attribute :: Unparsed ( _) => {
151
154
match attr. path ( ) . as_slice ( ) {
152
155
[ sym:: diagnostic, sym:: do_not_recommend, ..] => {
@@ -225,7 +228,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
225
228
[ sym:: collapse_debuginfo, ..] => self . check_collapse_debuginfo ( attr, span, target) ,
226
229
[ sym:: must_not_suspend, ..] => self . check_must_not_suspend ( attr, span, target) ,
227
230
[ sym:: must_use, ..] => self . check_must_use ( hir_id, attr, target) ,
228
- [ sym:: may_dangle, ..] => self . check_may_dangle ( hir_id, attr) ,
229
231
[ sym:: rustc_pass_by_value, ..] => self . check_pass_by_value ( attr, span, target) ,
230
232
[ sym:: rustc_allow_incoherent_impl, ..] => {
231
233
self . check_allow_incoherent_impl ( attr, span, target)
0 commit comments