Skip to content

[missing_const_for_fn]: Ensure dropped locals are ~const Destruct - #10891

Merged
bors merged 5 commits into
rust-lang:masterfrom
Centri3:missing_const_for_fn
Jun 13, 2023
Merged

bors merged 5 commits into
rust-lang:masterfrom
Centri3:missing_const_for_fn

Conversation

@Centri3

@Centri3 Centri3 commented Jun 5, 2023

Copy link
Copy Markdown
Member

this will check every local for TerminatorKind::Drop to ensure they can be evaluated at compile time, not sure if this is the best way to do this but MIR is confusing and it works so...

fixes #10617

changelog: [missing_const_for_fn]: Ensure dropped locals are ~const Destruct

@rustbot

rustbot commented Jun 5, 2023

Copy link
Copy Markdown
Collaborator

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 5, 2023
@Alexendoo

Copy link
Copy Markdown
Member

I have no experience on the MIR side of things, r? @Jarcho who I think does

@rustbot rustbot assigned Jarcho and unassigned Alexendoo Jun 7, 2023
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
@Centri3

Centri3 commented Jun 8, 2023 •

Copy link
Copy Markdown
Member Author

Ok, I got it working... Sorry for wasting your time with the trait solver shebacle 😅

Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
@Centri3
Centri3 force-pushed the missing_const_for_fn branch from 3fa7739 to a495fa0 Compare June 10, 2023 02:47
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
Comment thread clippy_utils/src/qualify_min_const_fn.rs Outdated
@Centri3
Centri3 force-pushed the missing_const_for_fn branch from 34883b2 to 9bc5a14 Compare June 13, 2023 18:19
@Jarcho

Jarcho commented Jun 13, 2023

Copy link
Copy Markdown
Contributor

Thank you. @bors r+

@bors

bors commented Jun 13, 2023

Copy link
Copy Markdown
Contributor

📌 Commit 9bc5a14 has been approved by Jarcho

It is now in the queue for this repository.

@bors

bors commented Jun 13, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9bc5a14 with merge eefc2a0...

@bors

bors commented Jun 13, 2023

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing eefc2a0 to master...

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] does not take into account whether receiver is ~const Destruct

5 participants