File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ macro_rules! rustc_attr {
3434 } ;
3535}
3636
37+ // FIXME: We shouldn't special case these at all, but as of now expanding attributes severely degrades
38+ // user experience due to lacking support.
39+ /// Built-in macro-like attributes.
40+ pub const EXTRA_ATTRIBUTES : & [ BuiltinAttribute ] = & [ "test" , "bench" ] ;
41+
3742/// "Inert" built-in attributes that have a special meaning to rustc or rustdoc.
3843#[ rustfmt:: skip]
3944pub const INERT_ATTRIBUTES : & [ BuiltinAttribute ] = & [
Original file line number Diff line number Diff line change @@ -1732,6 +1732,7 @@ impl ModCollector<'_, '_> {
17321732 let name = name. to_string ( ) ;
17331733 let is_inert = builtin_attr:: INERT_ATTRIBUTES
17341734 . iter ( )
1735+ . chain ( builtin_attr:: EXTRA_ATTRIBUTES )
17351736 . copied ( )
17361737 . chain ( self . def_collector . registered_attrs . iter ( ) . map ( AsRef :: as_ref) )
17371738 . any ( |attr| name == * attr) ;
You can’t perform that action at this time.
0 commit comments