-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 7 pull requests #140053
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
Rollup of 7 pull requests #140053
Conversation
.gitattributes lists *.fixed, *.pp, and *.mir as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code. At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include library/Cargo.toml.
skip-checks: true
…itchint, r=saethlin Do not remove trivial `SwitchInt` in analysis MIR This PR ensures that we don't prematurely remove trivial `SwitchInt` terminators which affects both the borrow-checking and runtime semantics (i.e. UB) of the code. Previously the `SimplifyCfg` optimization was removing `SwitchInt` terminators when they was "trivial", i.e. when all arms branched to the same basic block, even if that `SwitchInt` terminator had the side-effect of reading an operand which (for example) may not be initialized or may point to an invalid place in memory. This behavior is unlike all other optimizations, which are only applied after "analysis" (i.e. borrow-checking) is finished, and which Miri disables to make sure the compiler doesn't silently remove UB. Fixing this code "breaks" (i.e. unmasks) code that used to borrow-check but no longer does, like: ```rust fn foo() { let x; let (0 | _) = x; } ``` This match expression should perform a read because `_` does not shadow the `0` literal pattern, and the compiler should have to read the match scrutinee to compare it to 0. I've checked that this behavior does not actually manifest in practice via a crater run which came back clean: rust-lang#139042 (comment) As a side-note, it may be tempting to suggest that this is actually a good thing or that we should preserve this behavior. If we wanted to make this work (i.e. trivially optimize out reads from matches that are redundant like `0 | _`), then we should be enabling this behavior *after* fixing this. However, I think it's kinda unprincipled, and for example other variations of the code don't even work today, e.g.: ```rust fn foo() { let x; let (0.. | _) = x; } ```
add next_index to Enumerate Proposal: rust-lang/libs-team#435 Tracking Issue: rust-lang#130711 This basically just reopens rust-lang#130682 but squashed and with the new function and the feature gate renamed to `next_index.` There are two questions I have already: - Shouldn't we add test coverage for that? I'm happy to provide some, but I might need a pointer to where these test would be. - Maybe I could actually also add a doctest? - For now, I just renamed the feature name in the unstable attribute to `next_index`, as well, so it matches the new name of the function. Is that okay? And can I just do that and use any string, or is there a sealed list of features defined somewhere where I also need to change the name?
…ns, r=Mark-Simulacrum Setup editor file associations for non-rs extensions .gitattributes lists `*.fixed`, `*.pp`, and `*.mir` as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code. At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include `library/Cargo.toml`. I have tested this with VS Code and Zed. I have not implemented it for Emacs/Eglot or Helix.
…onur-ozkan skip llvm-config in autodiff check builds, when its unavailable As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled. r? ```@onur-ozkan``` closes rust-lang#139936 Tracking: - rust-lang#124509
…_renamed_item, r=nnethercote Improve `clean_maybe_renamed_item` function code a bit Follow-up of rust-lang#139846. This is what I tried to say in there: the `name` variable can be unwrapped in most cases so better do it directly once and for all if possible and move the cases where it's not possible above. r? `@nnethercote`
…ler-errors Remove early exits from JumpThreading. This removes early exits from rust-lang#131203 as I asked during review. The correctness of the backtracking is `mutated_statement` clearing all relevant conditions. If `process_statement` fails to insert a new condition, for instance by const-eval failure, `mutated_statement` still removes the obsolete conditions from the state. r? `@compiler-errors`
…kport-poll, r=aDotInTheVoid Add option for stable backport poll When creating polls on Zulip about stable backport ("Do we approve the backport of `rust-lang#12345`"?), stable backports should have the option of "approving, but only is a dot release is planned" (this is a hint to t-release about how the team think important - or not - is backporting some patch). Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stable-nominated.3A.20.23139328/near/510037866)[#t-rustdoc > stable-nominated: rust-lang#139328 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stable-nominated.3A.20.23139328/near/510037866) r? `@aDotInTheVoid` (feel free to adjust the wording!)
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 077cedc2af In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 077cedc (parent) -> 90fd16e (this PR) Test differencesShow 12 test diffsStage 0
Stage 1
Stage 2
Additionally, 6 doctest diffs were found. These are ignored, as they are noisy. Job group index
Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
Finished benchmarking commit (90fd16e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 1.3%, secondary 0.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -0.5%, secondary 2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary 0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 771.827s -> 770.888s (-0.12%) |
Successful merges:
SwitchInt
in analysis MIR #139042 (Do not remove trivialSwitchInt
in analysis MIR)clean_maybe_renamed_item
function code a bit #140008 (Improveclean_maybe_renamed_item
function code a bit)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup