@@ -60,10 +60,6 @@ impl AttrWrapper {
60
60
pub fn is_empty ( & self ) -> bool {
61
61
self . attrs . is_empty ( )
62
62
}
63
-
64
- pub fn is_complete ( & self ) -> bool {
65
- crate :: parser:: attr:: is_complete ( & self . attrs )
66
- }
67
63
}
68
64
69
65
/// Returns `true` if `attrs` contains a `cfg` or `cfg_attr` attribute
@@ -205,7 +201,7 @@ impl<'a> Parser<'a> {
205
201
// tokens by definition).
206
202
let needs_collection = matches ! ( force_collect, ForceCollect :: Yes )
207
203
// - Any of our outer attributes require tokens.
208
- || !attrs . is_complete ( )
204
+ || !crate :: parser :: attr :: is_complete ( & attrs . attrs )
209
205
// - Our target supports custom inner attributes (custom
210
206
// inner attribute invocation might require token capturing).
211
207
|| R :: SUPPORTS_CUSTOM_INNER_ATTRS
@@ -261,9 +257,9 @@ impl<'a> Parser<'a> {
261
257
// - We are force collecting tokens.
262
258
let needs_collection = matches ! ( force_collect, ForceCollect :: Yes )
263
259
// - Any of our outer *or* inner attributes require tokens.
264
- // (`attrs` was just outer attributes, but `ret.attrs()` is outer
265
- // and inner attributes. So this check is more precise than the
266
- // earlier `attrs. is_complete()` check, and we don't need to
260
+ // (`attr. attrs` was just outer attributes, but `ret.attrs()` is
261
+ // outer and inner attributes. So this check is more precise than
262
+ // the earlier `is_complete()` check, and we don't need to
267
263
// check `R::SUPPORTS_CUSTOM_INNER_ATTRS`.)
268
264
|| !crate :: parser:: attr:: is_complete ( ret. attrs ( ) )
269
265
// - We are in `capture_cfg` mode and there are `#[cfg]` or
0 commit comments