-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This is partially due to the fact that our analysis
query
rust/src/librustc_interface/passes.rs
Line 775 in 537ccdf
fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> { |
optimized_mir
query on all items in the current crate, and also because we don't run monomorphization when building bin crates.
- run
optimized_mir
query inanalysis
- this may cause slowdowns for
cargo check
because we'd be doing optimizations now - All const propagation lints are emitted in
optimized_mir
, but we may add more in the future.
- this may cause slowdowns for
- run monomorphization where possible.
- Not sure how useful this is, it will only give us additional lints in very specific situations. (e.g. when we subtract something form an associated constant, we may get an overflow error depending on the value of the constant).
- This will also be significantly more expensive than just running
optimized_mir
cc @Centril
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.