Convert more usages over
This commit is contained in:
parent
8a3797b736
commit
636f5e6d11
30 changed files with 44 additions and 48 deletions
|
|
@ -307,7 +307,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
} else {
|
||||
self.resolve_imports();
|
||||
if undetermined_invocations.is_empty() { break }
|
||||
invocations = mem::replace(&mut undetermined_invocations, Vec::new());
|
||||
invocations = mem::take(&mut undetermined_invocations);
|
||||
force = !mem::replace(&mut progress, false);
|
||||
continue
|
||||
};
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ pub fn transcribe(
|
|||
quoted::TokenTree::Delimited(mut span, delimited) => {
|
||||
span = span.apply_mark(cx.current_expansion.mark);
|
||||
stack.push(Frame::Delimited { forest: delimited, idx: 0, span });
|
||||
result_stack.push(mem::replace(&mut result, Vec::new()));
|
||||
result_stack.push(mem::take(&mut result));
|
||||
}
|
||||
|
||||
// Nothing much to do here. Just push the token to the result, being careful to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue