2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-05-08 08:10:16 -05:00
|
|
|
// Regression test for #36381. The monomorphization collector was asserting that
|
2016-09-30 17:15:11 -05:00
|
|
|
// there are no projection types, but the `<&str as
|
|
|
|
// StreamOnce>::Position` projection contained a late-bound region,
|
|
|
|
// and we don't currently normalize in that case until the function is
|
|
|
|
// actually invoked.
|
|
|
|
|
|
|
|
pub trait StreamOnce {
|
|
|
|
type Position;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> StreamOnce for &'a str {
|
|
|
|
type Position = usize;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn parser<F>(_: F) {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn follow(_: &str) -> <&str as StreamOnce>::Position {
|
|
|
|
panic!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
parser(follow);
|
|
|
|
}
|