]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52057.rs
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / issue-52057.rs
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
6
7 pub trait Parser {
8     type Input;
9
10     fn parse_first(input: &mut Self::Input);
11 }
12
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 }
21
22 fn main() {}