6 pub struct Iter<P: Parser>(P, P::Input);
8 pub struct Map<P, F>(P, F);
9 impl<P, F> Parser for Map<P, F> where F: FnMut(P) {
13 trait AstId { type Untyped; }
14 impl AstId for u32 { type Untyped = u32; }
16 fn record_type<Id: AstId>(i: Id::Untyped) -> u8 {
17 Iter(Map(i, |_: Id::Untyped| {}), 42).1
21 assert_eq!(record_type::<u32>(3), 42);