]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-52057.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-52057.rs
CommitLineData
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
7pub trait Parser {
8 type Input;
9e0c209e 9
8faf50e0 10 fn parse_first(input: &mut Self::Input);
223e47cc
LB
11}
12
8faf50e0
XL
13impl<'a, I, P: ?Sized> Parser for &'a mut P
14where
15 P: Parser<Input = I>,
16{
17 type Input = I;
18
19 fn parse_first(_: &mut Self::Input) {}
20}
a7813a04 21
9e0c209e 22fn main() {}