blob: 6c2de783c0166a10338d229464c8f7f61f687525 [file] [log] [blame]
// Regression test for Issue #20971.
// error-pattern:Hello, world!
pub trait Parser {
type Input;
fn parse(&mut self, input: <Self as Parser>::Input);
}
impl Parser for () {
type Input = ();
fn parse(&mut self, input: ()) {}
}
pub fn many() -> Box<Parser<Input = <() as Parser>::Input> + 'static> {
panic!("Hello, world!")
}
fn main() {
many().parse(());
}