]>
Commit | Line | Data |
---|---|---|
8faf50e0 XL |
1 | // Regression test for #52057. There is an implied bound |
2 | // that `I: 'a` where `'a` is the lifetime of `self` in `parse_first`; | |
3 | // but to observe that, one must normalize first. | |
4 | // | |
5 | // run-pass | |
1a4d82fc | 6 | |
8faf50e0 XL |
7 | pub trait Parser { |
8 | type Input; | |
9e0c209e | 9 | |
8faf50e0 | 10 | fn parse_first(input: &mut Self::Input); |
223e47cc LB |
11 | } |
12 | ||
8faf50e0 XL |
13 | impl<'a, I, P: ?Sized> Parser for &'a mut P |
14 | where | |
15 | P: Parser<Input = I>, | |
16 | { | |
17 | type Input = I; | |
18 | ||
19 | fn parse_first(_: &mut Self::Input) {} | |
20 | } | |
a7813a04 | 21 | |
9e0c209e | 22 | fn main() {} |