Skip to content

automata: Input::haystack return with original lifetime #1277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Chaoses-Ib
Copy link
Contributor

Input::haystack currently returns the haystack with the lifetime of &self, not 'h. This sometimes is not enough and can only be worked around by transmute. Should we return the original lifetime instead?

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. I'm surprised this never came up as an issue before this point!

@BurntSushi
Copy link
Member

#1278 is needed to fix CI. Once that's merged, can you rebase this on master?

@Chaoses-Ib Chaoses-Ib force-pushed the feat/automata-input-haystack branch from 5e5d100 to 663de3e Compare August 14, 2025 18:57
@Chaoses-Ib
Copy link
Contributor Author

CI passed.

@BurntSushi BurntSushi merged commit c1fdc83 into rust-lang:master Aug 24, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants