| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
this way we have mir::ConstValue and ty::ValTree as reasonably parallel
|
|
coverage: Fix an unstable-sort inconsistency in coverage spans
This code was calling `sort_unstable_by`, but failed to impose a total order on the initial spans. That resulted in unpredictable handling of closure spans, producing inconsistencies in the coverage maps and in user-visible coverage reports.
This PR fixes the problem by always sorting closure spans before otherwise-identical non-closure spans, and also switches to a stable sort in case the ordering is still not total.
---
In addition to the fix itself, this PR also contains a cleanup to the comparison function that I was working on when I discovered the bug.
|
|
Switching to `Ordering::then_with` makes control-flow less complicated, and
there is no need to use `partial_cmp` here.
|
|
This code was calling `sort_unstable_by`, but failed to impose a total order on
the initial spans. That resulted in unpredictable handling of closure spans,
producing inconsistencies in the coverage maps and in user-visible coverage
reports.
This patch fixes the problem by always sorting closure spans before
otherwise-identical non-closure spans, and also switches to a stable sort in
case the ordering is still not total.
|
|
Do not clone MIR for const-prop lint.
Addresses https://github.com/rust-lang/rust/pull/115797#issuecomment-1721250533
|
|
|
|
This hashmap's values were never used.
|
|
|
|
|
|
|
|
treat host effect params as erased in codegen
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
r? `@oli-obk`
|
|
This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
|
|
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #115736 (Remove `verbose_generic_activity_with_arg`)
- #115771 (cleanup leftovers of const_err lint)
- #115798 (add helper method for finding the one non-1-ZST field)
- #115812 (Merge settings.css into rustdoc.css)
- #115815 (fix: return early when has tainted in mir pass)
- #115816 (Disabled socketpair for Vita)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
fix: return early when has tainted in mir pass
Fixes https://github.com/rust-lang/rust/issues/115809
As in #115643, `run_pass` is skipped if the body has tainted errors.
r? `@oli-obk`
|
|
Remove `verbose_generic_activity_with_arg`
This removes `verbose_generic_activity_with_arg` and changes users to `generic_activity_with_arg`. This keeps the output of `-Z time` readable while these repeated events are still available with the self profiling mechanism.
|
|
Do not clone the Body for ConstProp
~Based on https://github.com/rust-lang/rust/pull/115748 for the `POST_MONO_CHECKS` flag.~
|
|
|
|
argument
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Improvements to dataflow const-prop
Partially cherry-picked from https://github.com/rust-lang/rust/pull/110719
r? `@oli-obk`
cc `@jachris`
|
|
fix: return early when has tainted in mir-lint
Fixes #115203
`a[..]` is of indeterminate size, it had been reported error during borrow check, therefore we skip the mir lint process.
|
|
coverage: Simplify the `coverageinfo` query
The `coverageinfo` query walks through a `mir::Body`'s statements to find the total number of coverage counter IDs and coverage expression IDs that have been used, as this information is needed by coverage codegen.
This PR makes 3 nice simplifications to that query:
- Extract a common iterator over coverage statements, shared by both coverage-related queries
- Simplify the query's visitor from two passes to just one pass
- Explicitly track the highest seen IDs in the visitor, and only convert to a count right at the end
I also updated some related comments. Some had been invalidated by these changes, while others had already been invalidated by previous coverage changes.
|
|
|
|
Don't report any errors in `lower_intrinsics`.
Intrinsics should have been type checked earlier.
This is part of moving all mir-opt diagnostics early enough so that they are reliably emitted even in check builds: https://github.com/rust-lang/rust/issues/49292#issuecomment-1692212095
|
|
This makes the visitor track the highest seen counter/expression IDs directly,
and only add +1 (to convert to a vector length) at the very end.
|
|
|
|
Both of the coverage queries can now use this one helper function to iterate
over all of the `mir::Coverage` payloads in the statements of a `mir::Body`.
|
|
Rollup of 9 pull requests
Successful merges:
- #114511 (Remove the unhelpful let binding diag comes from FormatArguments)
- #115473 (Add explanatory note to 'expected item' error)
- #115574 (Replace `rustc_data_structures` dependency with `rustc_index` in `rustc_parse_format`)
- #115578 (Clarify cryptic comments)
- #115587 (fix #115348)
- #115596 (A small change)
- #115598 (Fix log formatting in bootstrap)
- #115605 (Better Debug for `Ty` in smir)
- #115614 (Fix minor grammar typo)
r? `@ghost`
`@rustbot` modify labels: rollup
|