File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,9 @@ impl DefMap {
8383 }
8484
8585 if segments. len ( ) == 1 {
86- let registered = self . registered_attrs . iter ( ) . map ( SmolStr :: as_str) ;
87- let is_inert = builtin_attr:: INERT_ATTRIBUTES
88- . iter ( )
89- . map ( |it| it. name )
90- . chain ( registered)
91- . any ( pred) ;
86+ let mut registered = self . registered_attrs . iter ( ) . map ( SmolStr :: as_str) ;
87+ let is_inert =
88+ builtin_attr:: find_builtin_attr_idx ( & name) . is_some ( ) || registered. any ( pred) ;
9289 return is_inert;
9390 }
9491 }
Original file line number Diff line number Diff line change @@ -2697,9 +2697,7 @@ impl BuiltinAttr {
26972697 }
26982698
26992699 fn builtin ( name : & str ) -> Option < Self > {
2700- hir_def:: builtin_attr:: INERT_ATTRIBUTES
2701- . iter ( )
2702- . position ( |tool| tool. name == name)
2700+ hir_def:: builtin_attr:: find_builtin_attr_idx ( name)
27032701 . map ( |idx| BuiltinAttr { krate : None , idx : idx as u32 } )
27042702 }
27052703
You can’t perform that action at this time.
0 commit comments