@@ -61,8 +61,8 @@ impl AttrWrapper {
61
61
self . attrs . is_empty ( )
62
62
}
63
63
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 )
66
66
}
67
67
}
68
68
@@ -201,7 +201,7 @@ impl<'a> Parser<'a> {
201
201
// by definition
202
202
if matches ! ( force_collect, ForceCollect :: No )
203
203
// None of our outer attributes can require tokens (e.g. a proc-macro)
204
- && ! attrs. maybe_needs_tokens ( )
204
+ && attrs. is_complete ( )
205
205
// If our target supports custom inner attributes, then we cannot bail
206
206
// out early, since we may need to capture tokens for a custom inner attribute
207
207
// invocation.
@@ -244,9 +244,9 @@ impl<'a> Parser<'a> {
244
244
// Now that we've parsed an AST node, we have more information available.
245
245
if matches ! ( force_collect, ForceCollect :: No )
246
246
// 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.
248
248
// 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 ( ) )
250
250
// Subtle: We call `has_cfg_or_cfg_attr` with the attrs from `ret`.
251
251
// This ensures that we consider inner attributes (e.g. `#![cfg]`),
252
252
// which require us to have tokens available
0 commit comments