Skip to content
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

Fix a FP in missing_const_for_fn #7076

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

rail-rain
Copy link
Contributor

where a function that calls a standard library function whose constness
is unstable is considered as being able to be a const function. Fixes #5995.

The core change is the move from rustc_mir::const_eval::is_min_const_fn to rustc_mir::const_eval::is_const_fn. I'm not clear about the difference in their purpose between them so I'm not sure if it's acceptable to call qualify_min_const_fn::is_min_const_fn this way now.


changelog: missing_const_for_fn: No longer lints when an unstably const function is called

where a function that calls a standard library function whose constness
is unstable is considered as being able to be a const function
@rust-highfive
Copy link

r? @phansch

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 13, 2021
@phansch
Copy link
Member

phansch commented Apr 14, 2021

@bors r+ thanks!

@bors
Copy link
Contributor

bors commented Apr 14, 2021

📌 Commit 26a1989 has been approved by phansch

@bors
Copy link
Contributor

bors commented Apr 14, 2021

⌛ Testing commit 26a1989 with merge 19740d9...

@bors
Copy link
Contributor

bors commented Apr 14, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: phansch
Pushing 19740d9 to master...

@bors bors merged commit 19740d9 into rust-lang:master Apr 14, 2021
@rail-rain rail-rain deleted the missing_const_for_fn branch April 14, 2021 22:07
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.

false positive: unstable const fn
4 participants