diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-16 06:05:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-16 06:05:18 +0200 |
| commit | 2ba1d94f7a2579aeb68aa66ba304f23caaea85f1 (patch) | |
| tree | 7f0ae2f1a858ffad74bf937b80bbfa46a7182daa /src/libsyntax_ext | |
| parent | af561116516bd1d5ed4a830e08dc5e74293f78fb (diff) | |
| parent | 6a0abd60486d7301dea849e7107bc92380e6045e (diff) | |
| download | rust-2ba1d94f7a2579aeb68aa66ba304f23caaea85f1.tar.gz rust-2ba1d94f7a2579aeb68aa66ba304f23caaea85f1.zip | |
Rollup merge of #61866 - sinkuu:redundant_clone, r=petrochenkov
Remove redundant `clone()`s
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/format.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax_ext/proc_macro_server.rs | 2 |
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), |
