about summary refs log tree commit diff
path: root/compiler/rustc_ast
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-12-13 02:06:24 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-12-13 02:06:24 +0900
commitee40a67cd9283a9e8b0de87926581456252c6c9f (patch)
tree61de3c03f9e0643c40ddc028094bf1aeccd58792 /compiler/rustc_ast
parentf34356eaceeb5540f4e2e20abc1d824daf395806 (diff)
downloadrust-ee40a67cd9283a9e8b0de87926581456252c6c9f.tar.gz
rust-ee40a67cd9283a9e8b0de87926581456252c6c9f.zip
remove unnecessary uses of `clone`
Diffstat (limited to 'compiler/rustc_ast')
-rw-r--r--compiler/rustc_ast/src/token.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs
index c0cc4e79a3d..7b8c0d79a17 100644
--- a/compiler/rustc_ast/src/token.rs
+++ b/compiler/rustc_ast/src/token.rs
@@ -114,7 +114,7 @@ impl Lit {
                 if let NtExpr(expr) | NtLiteral(expr) = &**nt
                 && let ast::ExprKind::Lit(token_lit) = expr.kind =>
             {
-                Some(token_lit.clone())
+                Some(token_lit)
             }
             _ => None,
         }