about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-08-03 09:14:20 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-08-17 08:26:55 +1000
commit9de696b39fbe661d827ab8d8335df9f1efd86c3b (patch)
tree3a45f765b76e63c6a96e17067673047ae13c10fe
parent27fb598d51d4566a725e4868eaf5d2e15775193e (diff)
downloadrust-9de696b39fbe661d827ab8d8335df9f1efd86c3b.tar.gz
rust-9de696b39fbe661d827ab8d8335df9f1efd86c3b.zip
Remove some unnecessary (and badly named) local variables.
-rw-r--r--compiler/rustc_expand/src/mbe/transcribe.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_expand/src/mbe/transcribe.rs b/compiler/rustc_expand/src/mbe/transcribe.rs
index a5f83b88f7e..15e7ab3fe3e 100644
--- a/compiler/rustc_expand/src/mbe/transcribe.rs
+++ b/compiler/rustc_expand/src/mbe/transcribe.rs
@@ -220,16 +220,15 @@ pub(super) fn transcribe<'a>(
                         MatchedTokenTree(tt) => {
                             // `tt`s are emitted into the output stream directly as "raw tokens",
                             // without wrapping them into groups.
-                            let token = tt.clone();
-                            result.push(token);
+                            result.push(tt.clone());
                         }
                         MatchedNonterminal(nt) => {
                             // Other variables are emitted into the output stream as groups with
                             // `Delimiter::Invisible` to maintain parsing priorities.
                             // `Interpolated` is currently used for such groups in rustc parser.
                             marker.visit_span(&mut sp);
-                            let token = TokenTree::token_alone(token::Interpolated(nt.clone()), sp);
-                            result.push(token);
+                            result
+                                .push(TokenTree::token_alone(token::Interpolated(nt.clone()), sp));
                         }
                         MatchedSeq(..) => {
                             // We were unable to descend far enough. This is an error.