Skip to content

Check MSRV before suggesting applying const to a function #15080

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
merged 1 commit into from
Jun 19, 2025

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Jun 19, 2025

If a function environment contains trait bounds other than Sized, const cannot be used before Rust 1.61.

changelog: [missing_const_for_fn]: check MSRV before emitting lint on function containing non-Sized trait bounds

Fixes #15079

r? Jarcho

If a function environment contains trait bounds other than `Sized`,
`const` cannot be used before Rust 1.61.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 19, 2025
Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

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

Thank you.

@Jarcho Jarcho added this pull request to the merge queue Jun 19, 2025
Merged via the queue into rust-lang:master with commit 498562d Jun 19, 2025
11 of 13 checks passed
@samueltardieu samueltardieu deleted the issue-15079 branch June 19, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing_const_for_fn should respect MSRV for trait bounds
3 participants