]> git.lizzy.rs Git - rust.git/commitdiff
Remove needless lifetimes
authorJeremy Stucki <jeremy@myelin.ch>
Fri, 21 Jun 2019 11:31:20 +0000 (13:31 +0200)
committerflip1995 <hello@philkrones.com>
Fri, 21 Jun 2019 12:41:19 +0000 (14:41 +0200)
clippy_lints/src/consts.rs
clippy_lints/src/missing_inline.rs
clippy_lints/src/utils/mod.rs

index 480118ca7ea412b21681644a1318140ee61acb33..9f6cfe04c1b17b5a9725e549cdc95e1d024f321b 100644 (file)
@@ -154,7 +154,7 @@ pub fn partial_cmp(tcx: TyCtxt<'_>, cmp_type: Ty<'_>, left: &Self, right: &Self)
 }
 
 /// Parses a `LitKind` to a `Constant`.
-pub fn lit_to_constant<'tcx>(lit: &LitKind, ty: Ty<'tcx>) -> Constant {
+pub fn lit_to_constant(lit: &LitKind, ty: Ty<'_>) -> Constant {
     use syntax::ast::*;
 
     match *lit {
index 8de0d02c61b8c839ff949e91ae781ea598564010..b97b9bc7008ff50b80077c778b6cbbda092b2880 100644 (file)
@@ -68,7 +68,7 @@ fn check_missing_inline_attrs(cx: &LateContext<'_, '_>, attrs: &[ast::Attribute]
     }
 }
 
-fn is_executable<'a, 'tcx>(cx: &LateContext<'a, 'tcx>) -> bool {
+fn is_executable<'a>(cx: &LateContext<'a, '_>) -> bool {
     use rustc::session::config::CrateType;
 
     cx.tcx.sess.crate_types.get().iter().any(|t: &CrateType| match t {
index 004a54346a6d02b042e5d077225a26492e752192..f8c8da0a36c265d20a21eee70c95b55813735637 100644 (file)
@@ -342,7 +342,7 @@ pub fn resolve_node(cx: &LateContext<'_, '_>, qpath: &QPath, id: HirId) -> Res {
 
 /// Returns the method names and argument list of nested method call expressions that make up
 /// `expr`.
-pub fn method_calls<'a>(expr: &'a Expr, max_depth: usize) -> (Vec<Symbol>, Vec<&'a [Expr]>) {
+pub fn method_calls(expr: &Expr, max_depth: usize) -> (Vec<Symbol>, Vec<&[Expr]>) {
     let mut method_names = Vec::with_capacity(max_depth);
     let mut arg_lists = Vec::with_capacity(max_depth);