diff options
| author | Jeremy Stucki <jeremy@myelin.ch> | 2019-06-21 18:51:27 +0200 |
|---|---|---|
| committer | Jeremy Stucki <stucki.jeremy@gmail.com> | 2019-07-03 10:01:01 +0200 |
| commit | 6ae80cf23f744566f2822861291abcfcdc6af5ce (patch) | |
| tree | 5b36d5eb40c99ee9892b05e6c94e367d3f4d9302 /src/libsyntax_ext | |
| parent | 0477e072723438054ef8628ec33223cf94bacb69 (diff) | |
| download | rust-6ae80cf23f744566f2822861291abcfcdc6af5ce.tar.gz rust-6ae80cf23f744566f2822861291abcfcdc6af5ce.zip | |
Remove needless lifetimes
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/ty.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 444cf1263ce..12482f7248e 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -331,8 +331,8 @@ pub type CombineSubstructureFunc<'a> = pub type EnumNonMatchCollapsedFunc<'a> = Box<dyn FnMut(&mut ExtCtxt<'_>, Span, (&[Ident], &[Ident]), &[P<Expr>]) -> P<Expr> + 'a>; -pub fn combine_substructure<'a>(f: CombineSubstructureFunc<'a>) - -> RefCell<CombineSubstructureFunc<'a>> { +pub fn combine_substructure(f: CombineSubstructureFunc<'_>) + -> RefCell<CombineSubstructureFunc<'_>> { RefCell::new(f) } diff --git a/src/libsyntax_ext/deriving/generic/ty.rs b/src/libsyntax_ext/deriving/generic/ty.rs index 90d826429da..02b02e9b836 100644 --- a/src/libsyntax_ext/deriving/generic/ty.rs +++ b/src/libsyntax_ext/deriving/generic/ty.rs @@ -39,10 +39,10 @@ pub enum PathKind { } impl<'a> Path<'a> { - pub fn new<'r>(path: Vec<&'r str>) -> Path<'r> { + pub fn new(path: Vec<&str>) -> Path<'_> { Path::new_(path, None, Vec::new(), PathKind::Std) } - pub fn new_local<'r>(path: &'r str) -> Path<'r> { + pub fn new_local(path: &str) -> Path<'_> { Path::new_(vec![path], None, Vec::new(), PathKind::Local) } pub fn new_<'r>(path: Vec<&'r str>, @@ -117,7 +117,7 @@ pub enum Const { pub fn borrowed_ptrty<'r>() -> PtrTy<'r> { Borrowed(None, ast::Mutability::Immutable) } -pub fn borrowed<'r>(ty: Box<Ty<'r>>) -> Ty<'r> { +pub fn borrowed(ty: Box<Ty<'_>>) -> Ty<'_> { Ptr(ty, borrowed_ptrty()) } |
