use CursorRef
more, to not to clone Tree
s
This commit is contained in:
parent
10b3a0d209
commit
cc5f3e21ac
10 changed files with 35 additions and 24 deletions
|
@ -400,7 +400,7 @@ impl<'a> StripUnconfigured<'a> {
|
|||
|
||||
// Use the `#` in `#[cfg_attr(pred, attr)]` as the `#` token
|
||||
// for `attr` when we expand it to `#[attr]`
|
||||
let mut orig_trees = orig_tokens.trees();
|
||||
let mut orig_trees = orig_tokens.into_trees();
|
||||
let TokenTree::Token(pound_token @ Token { kind: TokenKind::Pound, .. }) = orig_trees.next().unwrap() else {
|
||||
panic!("Bad tokens for attribute {:?}", attr);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue