-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work onT-MIRType: This lint will require working with the MIRType: This lint will require working with the MIR
Description
For example, const-checking needs to run before optimizations, otherwise it might miss some invalid operations that get optimized away. Specifically, it should run on the result of the mir_const
query, but currently it uses optimized_mir
. This is because the result of the mir_const
query is "stolen" instead of cloned, so it no longer exists when clippy
runs. clippy
tries to work around this by setting mir-opt-level=0
, but this doesn't disable every optimization pass.
Until this is fixed, missing_const_for_fn
will have false positives and/or ICE (due to some assertions about the state of the MIR at the point const-checking is run).
KisaragiEffective
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work onT-MIRType: This lint will require working with the MIRType: This lint will require working with the MIR