Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

@Chaoses-Ib Chaoses-Ib commented Aug 14, 2025

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!

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
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

Reviewers

@BurntSushi BurntSushi BurntSushi approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /