diff options
| author | bors <bors@rust-lang.org> | 2019-06-18 19:04:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-06-18 19:04:15 +0000 |
| commit | 04a3dd8a872633ca1e4c217d11f741cc35cb19a5 (patch) | |
| tree | c8d89b1c1dc99017ffbeb443e2f1e5deb6ddbd2a /src/libsyntax_ext | |
| parent | 673cf7de44b5a98092b5bc7cf2906e866383a65d (diff) | |
| parent | 2be847b2f95414690538bea48138a6738b47b43a (diff) | |
| download | rust-04a3dd8a872633ca1e4c217d11f741cc35cb19a5.tar.gz rust-04a3dd8a872633ca1e4c217d11f741cc35cb19a5.zip | |
Auto merge of #61891 - eddyb:lifetime-cleanups, r=oli-obk
rustc: remove 'x: 'y bounds (except where necessary or from comments/strings). This PR removes all lifetime-lifetime "outlives" bounds (e.g. `'tcx: 'a`) bounds except a few necessary ones (see the `reintroduce lifetime bounds where necessary` commit). Some of these bounds kept around otherwise-unused lifetimes (e.g. `<'a, 'tcx: 'a>` followed by uses of `'tcx` but not `'a`) - these lifetimes (i.e. `'a`) were then removed. (maybe they should be considered unused by the lint? cc @matthewjasper @zackmdavis) r? @oli-obk cc @rust-lang/compiler
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 13 | ||||
| -rw-r--r-- | src/libsyntax_ext/format.rs | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 8b719b5477c..444cf1263ce 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -339,14 +339,15 @@ pub fn combine_substructure<'a>(f: CombineSubstructureFunc<'a>) /// This method helps to extract all the type parameters referenced from a /// type. For a type parameter `<T>`, it looks for either a `TyPath` that /// is not global and starts with `T`, or a `TyQPath`. -fn find_type_parameters(ty: &ast::Ty, - ty_param_names: &[ast::Name], - span: Span, - cx: &ExtCtxt<'_>) - -> Vec<P<ast::Ty>> { +fn find_type_parameters( + ty: &ast::Ty, + ty_param_names: &[ast::Name], + span: Span, + cx: &ExtCtxt<'_>, +) -> Vec<P<ast::Ty>> { use syntax::visit; - struct Visitor<'a, 'b: 'a> { + struct Visitor<'a, 'b> { cx: &'a ExtCtxt<'b>, span: Span, ty_param_names: &'a [ast::Name], diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs index f44a6e7efa4..a5f96559ca8 100644 --- a/src/libsyntax_ext/format.rs +++ b/src/libsyntax_ext/format.rs @@ -31,7 +31,7 @@ enum Position { Named(Symbol), } -struct Context<'a, 'b: 'a> { +struct Context<'a, 'b> { ecx: &'a mut ExtCtxt<'b>, /// The macro's call site. References to unstable formatting internals must /// use this span to pass the stability checker. |
