]>
Commit | Line | Data |
---|---|---|
85aaf69f | 1 | // Regression test for Issue #20971. |
223e47cc | 2 | |
72b1a166 | 3 | // run-fail |
85aaf69f | 4 | // error-pattern:Hello, world! |
72b1a166 | 5 | // ignore-emscripten no processes |
85aaf69f SL |
6 | |
7 | pub trait Parser { | |
8 | type Input; | |
9 | fn parse(&mut self, input: <Self as Parser>::Input); | |
10 | } | |
11 | ||
12 | impl Parser for () { | |
13 | type Input = (); | |
3157f602 | 14 | fn parse(&mut self, input: ()) {} |
85aaf69f SL |
15 | } |
16 | ||
72b1a166 | 17 | pub fn many() -> Box<dyn Parser<Input = <() as Parser>::Input> + 'static> { |
85aaf69f SL |
18 | panic!("Hello, world!") |
19 | } | |
223e47cc | 20 | |
85aaf69f | 21 | fn main() { |
3157f602 | 22 | many().parse(()); |
223e47cc | 23 | } |