Remove needless lifetimes

This commit is contained in:
Jeremy Stucki 2019-06-21 13:31:20 +02:00 committed by flip1995
parent 5a11ed7b92
commit 746fbad98a
No known key found for this signature in database
GPG Key ID: 693086869D506637
3 changed files with 3 additions and 3 deletions

View 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 {

View 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 {

View 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);