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 | |
| 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')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/placeholders.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 3fa96c60bff..d433e6c5a89 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -242,7 +242,7 @@ impl Invocation { } } -pub struct MacroExpander<'a, 'b:'a> { +pub struct MacroExpander<'a, 'b> { pub cx: &'a mut ExtCtxt<'b>, monotonic: bool, // cf. `cx.monotonic_expander()` } @@ -1031,7 +1031,7 @@ impl<'a> Parser<'a> { } } -struct InvocationCollector<'a, 'b: 'a> { +struct InvocationCollector<'a, 'b> { cx: &'a mut ExtCtxt<'b>, cfg: StripUnconfigured<'a>, invocations: Vec<Invocation>, diff --git a/src/libsyntax/ext/placeholders.rs b/src/libsyntax/ext/placeholders.rs index c56c156182b..b2b8bfb09b4 100644 --- a/src/libsyntax/ext/placeholders.rs +++ b/src/libsyntax/ext/placeholders.rs @@ -69,7 +69,7 @@ pub fn placeholder(kind: AstFragmentKind, id: ast::NodeId) -> AstFragment { } } -pub struct PlaceholderExpander<'a, 'b: 'a> { +pub struct PlaceholderExpander<'a, 'b> { expanded_fragments: FxHashMap<ast::NodeId, AstFragment>, cx: &'a mut ExtCtxt<'b>, monotonic: bool, diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 4758b6a50e5..d5da4c920bc 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -156,7 +156,7 @@ type NamedMatchVec = SmallVec<[NamedMatch; 4]>; /// all the elements in that `SmallVec` strictly outlive the root stack slot /// lifetime. By separating `'tt` from `'root`, we can show that. #[derive(Clone)] -struct MatcherPos<'root, 'tt: 'root> { +struct MatcherPos<'root, 'tt> { /// The token or sequence of tokens that make up the matcher top_elts: TokenTreeOrTokenTreeSlice<'tt>, @@ -233,7 +233,7 @@ impl<'root, 'tt> MatcherPos<'root, 'tt> { // Therefore, the initial MatcherPos is always allocated on the stack, // subsequent ones (of which there aren't that many) are allocated on the heap, // and this type is used to encapsulate both cases. -enum MatcherPosHandle<'root, 'tt: 'root> { +enum MatcherPosHandle<'root, 'tt> { Ref(&'root mut MatcherPos<'root, 'tt>), Box(Box<MatcherPos<'root, 'tt>>), } |
