about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorShotaro Yamada <sinkuu@sinkuu.xyz>2019-06-08 19:06:58 +0900
committerShotaro Yamada <sinkuu@sinkuu.xyz>2019-06-15 20:46:00 +0900
commit6a0abd60486d7301dea849e7107bc92380e6045e (patch)
tree6eb5af0a7c8a51aa1711e96da10fec8fe0ef31d3 /src/libsyntax_ext
parent165842ba1fe09b6e0f142dc3cb27597b85b96e85 (diff)
downloadrust-6a0abd60486d7301dea849e7107bc92380e6045e.tar.gz
rust-6a0abd60486d7301dea849e7107bc92380e6045e.zip
Remove unnecessary `.clone()`
Diffstat (limited to 'src/libsyntax_ext')
-rw-r--r--src/libsyntax_ext/format.rs2
-rw-r--r--src/libsyntax_ext/proc_macro_server.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs
index 85b524786b2..f44a6e7efa4 100644
--- a/src/libsyntax_ext/format.rs
+++ b/src/libsyntax_ext/format.rs
@@ -887,7 +887,7 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt<'_>,
     };
 
     let fmt_str = &*fmt.node.0.as_str();  // for the suggestions below
-    let mut parser = parse::Parser::new(fmt_str, str_style, skips.clone(), append_newline);
+    let mut parser = parse::Parser::new(fmt_str, str_style, skips, append_newline);
 
     let mut unverified_pieces = Vec::new();
     while let Some(piece) = parser.next() {
diff --git a/src/libsyntax_ext/proc_macro_server.rs b/src/libsyntax_ext/proc_macro_server.rs
index 00a420d3fa8..b5d5a38ce5b 100644
--- a/src/libsyntax_ext/proc_macro_server.rs
+++ b/src/libsyntax_ext/proc_macro_server.rs
@@ -409,7 +409,7 @@ impl server::TokenStream for Rustc<'_> {
     }
     fn from_str(&mut self, src: &str) -> Self::TokenStream {
         parse::parse_stream_from_source_str(
-            FileName::proc_macro_source_code(src.clone()),
+            FileName::proc_macro_source_code(src),
             src.to_string(),
             self.sess,
             Some(self.call_site),