Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove ClippyCtfe pass #14712

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Alexendoo
Copy link
Member

It doesn't seem to be load bearing for any clippy lints and the rustc ones that no longer appear behave the same as they would for a cargo check

r? @blyxyas

changelog: none

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 30, 2025
@blyxyas
Copy link
Member

blyxyas commented Apr 30, 2025

The CTFE lint pass was added to make sure that we perform all CTFE evaluations. One example of these is checking if an index operation has any possibility of not panicking.

The lint was initially there to make sure that CTFE was being done. But on further thinking, turns out that a bare cargo check DOESN'T check CTFE on inlined const { block; } blocks.

This has brought up a good question, should the compiler lint for CTFE on inline const blocks, even further, should Clippy?

@Alexendoo
Copy link
Member Author

There's an open issue for it here rust-lang/rust#49292

Worth mentioning that the lint pass doesn't bring it up to full cargo build level of errors, e.g. it doesn't make rust-lang/rust#99682 trigger

Personally I think we should remove the pass and match whatever behaviour cargo check gives us

@blyxyas
Copy link
Member

blyxyas commented May 1, 2025

On one hand, if cargo check doesn't bother with this, why should Clippy. On the other hand, Clippy is a linter, it may be in the user's interest for us to provide of this warnings

@Alexendoo
Copy link
Member Author

If you're undecided we could go with a zulip poll

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.

3 participants