@@ -61,8 +61,8 @@ impl AttrWrapper {
6161 self . attrs . is_empty ( )
6262 }
6363
64- pub fn maybe_needs_tokens ( & self ) -> bool {
65- crate :: parser:: attr:: maybe_needs_tokens ( & self . attrs )
64+ pub fn is_complete ( & self ) -> bool {
65+ crate :: parser:: attr:: is_complete ( & self . attrs )
6666 }
6767}
6868
@@ -201,7 +201,7 @@ impl<'a> Parser<'a> {
201201 // by definition
202202 if matches ! ( force_collect, ForceCollect :: No )
203203 // None of our outer attributes can require tokens (e.g. a proc-macro)
204- && ! attrs. maybe_needs_tokens ( )
204+ && attrs. is_complete ( )
205205 // If our target supports custom inner attributes, then we cannot bail
206206 // out early, since we may need to capture tokens for a custom inner attribute
207207 // invocation.
@@ -244,9 +244,9 @@ impl<'a> Parser<'a> {
244244 // Now that we've parsed an AST node, we have more information available.
245245 if matches ! ( force_collect, ForceCollect :: No )
246246 // We now have inner attributes available, so this check is more precise
247- // than `attrs.maybe_needs_tokens ()` at the start of the function.
247+ // than `attrs.is_complete ()` at the start of the function.
248248 // As a result, we don't need to check `R::SUPPORTS_CUSTOM_INNER_ATTRS`
249- && ! crate :: parser:: attr:: maybe_needs_tokens ( ret. attrs ( ) )
249+ && crate :: parser:: attr:: is_complete ( ret. attrs ( ) )
250250 // Subtle: We call `has_cfg_or_cfg_attr` with the attrs from `ret`.
251251 // This ensures that we consider inner attributes (e.g. `#![cfg]`),
252252 // which require us to have tokens available
0 commit comments