Skip to content

lifetimes for StrContext #807

@slonkazoid

Description

@slonkazoid

Please complete the following tasks

winnow version

0.7.12

Describe your use case

parser generates errors that are dependent of the lifetime of the input. would like to use what it expects in a StrContextValue::Description, which uses the same lifetime

Describe the solution you'd like

add a generic lifetime to StrContext

Alternatives, if applicable

Cow<'static, str> instead of &'static str but this is more expensive in multiple ways

Additional Context

using jaq-core
already implemented and ran tests for it in #806

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-errorArea: error reportingC-enhancementCategory: Raise on the bar on expectationsM-breaking-changeMeta: Implementing or merging this will introduce a breaking change.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions