Skip to content

Have you just broke everything?Β #690

Closed
@DimanNe

Description

Please complete the following tasks

rust version

rustc 1.83.0 (90b35a623 2024-11-26)

winnow version

latest?

Minimal reproducible code

cargo install --root ./target typst-cli

Steps to reproduce the bug with the above code

Actual Behaviour

error[E0277]: the trait bound `(u8, for<'a> fn(&'a mut Stateful<{type error}, parser::prelude::RecursionCheck>) -> Result<&str, ErrMode<winnow::error::ContextError>> {ws::<'_>}, for<'a> fn(&'a mut Stateful<{type error}, parser::prelude::RecursionCheck>) -> Result<(), ErrMode<winnow::error::ContextError>> {ws_newlines}): winnow::Parser<_, _, _>` is not satisfied
   --> /Users/dimanne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/toml_edit-0.22.22/src/parser/strings.rs:250:5
    |
250 |     repeat(1.., (ESCAPE, ws, ws_newlines))
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `winnow::Parser<_, _, _>` is not implemented for `(u8, for<'a> fn(&'a mut Stateful<{type error}, parser::prelude::RecursionCheck>) -> Result<&str, ErrMode<winnow::error::ContextError>> {ws::<'_>}, for<'a> fn(&'a mut Stateful<{type error}, parser::prelude::RecursionCheck>) -> Result<(), ErrMode<winnow::error::ContextError>> {ws_newlines})`
    |
    = help: the following other types implement trait `winnow::Parser<I, O, E>`:
              `()` implements `winnow::Parser<I, (), E>`
              `(P1, P2)` implements `winnow::Parser<I, (O1, O2), E>`
              `(P1, P2, P3)` implements `winnow::Parser<I, (O1, O2, O3), E>`
              `(P1, P2, P3, P4)` implements `winnow::Parser<I, (O1, O2, O3, O4), E>`
              `(P1, P2, P3, P4, P5)` implements `winnow::Parser<I, (O1, O2, O3, O4, O5), E>`
              `(P1, P2, P3, P4, P5, P6)` implements `winnow::Parser<I, (O1, O2, O3, O4, O5, O6), E>`
              `(P1, P2, P3, P4, P5, P6, P7)` implements `winnow::Parser<I, (O1, O2, O3, O4, O5, O6, O7), E>`
              `(P1, P2, P3, P4, P5, P6, P7, P8)` implements `winnow::Parser<I, (O1, O2, O3, O4, O5, O6, O7, O8), E>`
            and 14 others
note: required by a bound in `winnow::combinator::Repeat`
   --> /Users/dimanne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winnow-0.6.23/src/combinator/multi.rs:139:8
    |
137 | pub struct Repeat<P, I, O, C, E>
    |            ------ required by a bound in this struct
138 | where
139 |     P: Parser<I, O, E>,
    |        ^^^^^^^^^^^^^^^ required by this bound in `Repeat`

Expected Behaviour

it works

Additional Context

No response

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Things not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions