@@ -1157,15 +1157,15 @@ where
11571157}
11581158
11591159/// See [`Parser::nested_in`].
1160- pub struct NestedIn < A , B , J , F , O , E > {
1160+ pub struct NestedIn < A , B , J , O , E > {
11611161 pub ( crate ) parser_a : A ,
11621162 pub ( crate ) parser_b : B ,
11631163 #[ allow( dead_code) ]
1164- pub ( crate ) phantom : EmptyPhantom < ( J , F , O , E ) > ,
1164+ pub ( crate ) phantom : EmptyPhantom < ( J , O , E ) > ,
11651165}
11661166
1167- impl < A : Copy , B : Copy , J , F , O , E > Copy for NestedIn < A , B , J , F , O , E > { }
1168- impl < A : Clone , B : Clone , J , F , O , E > Clone for NestedIn < A , B , J , F , O , E > {
1167+ impl < A : Copy , B : Copy , J , O , E > Copy for NestedIn < A , B , J , O , E > { }
1168+ impl < A : Clone , B : Clone , J , O , E > Clone for NestedIn < A , B , J , O , E > {
11691169 fn clone ( & self ) -> Self {
11701170 Self {
11711171 parser_a : self . parser_a . clone ( ) ,
@@ -1175,14 +1175,32 @@ impl<A: Clone, B: Clone, J, F, O, E> Clone for NestedIn<A, B, J, F, O, E> {
11751175 }
11761176}
11771177
1178- impl < ' src , I , J , E , F , A , B , O > Parser < ' src , I , O , E > for NestedIn < A , B , J , F , O , E >
1178+ impl < ' src , I , J , E , A , B , O > Parser < ' src , I , O , E > for NestedIn < A , B , J , O , E >
11791179where
11801180 I : Input < ' src > ,
11811181 E : ParserExtra < ' src , I > ,
1182+ // These bounds looks silly, but they basically just ensure that the extra type of the inner parser is compatible with the extra of the outer parser
1183+ E : ParserExtra <
1184+ ' src ,
1185+ J ,
1186+ Error = <E as ParserExtra < ' src , I > >:: Error ,
1187+ State = <E as ParserExtra < ' src , I > >:: State ,
1188+ Context = <E as ParserExtra < ' src , I > >:: Context ,
1189+ > ,
1190+ <E as ParserExtra < ' src , I > >:: Error : Error < ' src , J > ,
1191+ <E as ParserExtra < ' src , I > >:: State : Inspector < ' src , J > ,
11821192 B : Parser < ' src , I , J , E > ,
11831193 J : Input < ' src > ,
1184- F : ParserExtra < ' src , J , State = E :: State , Context = E :: Context , Error = E :: Error > ,
1185- A : Parser < ' src , J , O , F > ,
1194+ A : Parser <
1195+ ' src ,
1196+ J ,
1197+ O ,
1198+ extra:: Full <
1199+ <E as ParserExtra < ' src , I > >:: Error ,
1200+ <E as ParserExtra < ' src , I > >:: State ,
1201+ <E as ParserExtra < ' src , I > >:: Context ,
1202+ > ,
1203+ > ,
11861204{
11871205 #[ inline( always) ]
11881206 fn go < M : Mode > ( & self , inp : & mut InputRef < ' src , ' _ , I , E > ) -> PResult < M , O > {
0 commit comments