summary refs log tree commit diff
path: root/src/librustc_parse/parser
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-03-05 22:04:10 +0100
committerGitHub <noreply@github.com>2020-03-05 22:04:10 +0100
commit67d735c4bf99dbbbe2eea9a90a0149ffa942f492 (patch)
tree9c326d06402d57d5165e349e36ee6d018df3085f /src/librustc_parse/parser
parent558115b86ccc60aa2132f0e66527bc24842d1ade (diff)
parent84577c86bf5e1908acfc2cd097684f11e828518c (diff)
downloadrust-67d735c4bf99dbbbe2eea9a90a0149ffa942f492.tar.gz
rust-67d735c4bf99dbbbe2eea9a90a0149ffa942f492.zip
Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPC
even more clippy cleanups

* Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed)
* Use more efficient &&str to String conversion (clippy::inefficient_to_string)
* Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call)
* Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg)
* Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator)
* Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes)
* Remove redundant patterns when matching ( x @ _  to  x) (clippy::redundant_pattern)
Diffstat (limited to 'src/librustc_parse/parser')
-rw-r--r--src/librustc_parse/parser/diagnostics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/diagnostics.rs b/src/librustc_parse/parser/diagnostics.rs
index 0759c43d452..8b43b424f55 100644
--- a/src/librustc_parse/parser/diagnostics.rs
+++ b/src/librustc_parse/parser/diagnostics.rs
@@ -19,7 +19,7 @@ use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
 use log::{debug, trace};
 use std::mem;
 
-const TURBOFISH: &'static str = "use `::<...>` instead of `<...>` to specify type arguments";
+const TURBOFISH: &str = "use `::<...>` instead of `<...>` to specify type arguments";
 
 /// Creates a placeholder argument.
 pub(super) fn dummy_arg(ident: Ident) -> Param {