6 pub struct Iter<P: Parser>(#[allow(unused_tuple_struct_fields)] P, P::Input);
8 #[allow(unused_tuple_struct_fields)]
9 pub struct Map<P, F>(P, F);
10 impl<P, F> Parser for Map<P, F> where F: FnMut(P) {
14 trait AstId { type Untyped; }
15 impl AstId for u32 { type Untyped = u32; }
17 fn record_type<Id: AstId>(i: Id::Untyped) -> u8 {
18 Iter(Map(i, |_: Id::Untyped| {}), 42).1
22 assert_eq!(record_type::<u32>(3), 42);