]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/issue-20971.rs
Use better bound names in `-Zverbose` mode
[rust.git] / src / test / run-fail / issue-20971.rs
1 // Regression test for Issue #20971.
2
3 // error-pattern:Hello, world!
4
5 pub trait Parser {
6     type Input;
7     fn parse(&mut self, input: <Self as Parser>::Input);
8 }
9
10 impl Parser for () {
11     type Input = ();
12     fn parse(&mut self, input: ()) {}
13 }
14
15 pub fn many() -> Box<Parser<Input = <() as Parser>::Input> + 'static> {
16     panic!("Hello, world!")
17 }
18
19 fn main() {
20     many().parse(());
21 }