Rollup of 7 pull requests#155766
Conversation
Since call destinations are evaluated after call arguments, we can't turn copy arguments into moves if the same local is later used as an index projection in the call destination.
This made it very annoying to debug bootstrap itself, because every `--dry-run` invocation would start out by cloning LLVM, which is almost never necessary. Instead change a few Steps to properly support dry_run when no submodule is checked out.
…t-dollar-suggestion, r=eholk Improve suggestion for $-prefixed fragment specifiers Fixes rust-lang#155505
… r=adwinwhite Avoid redundant clone suggestions in borrowck diagnostics Fixes rust-lang#153886 Removed redundant `.clone()` suggestions. I found that there are two patterns to handle this issue while I was implementing: - Should suggest only UFCS - Should suggest only simple `.clone()` For the target issue, we can just remove the UFCS (`<Option<String> as Clone>::clone(&selection.1)`) side. However, for the `BorrowedContentSource::OverloadedDeref` pattern like `Rc<Vec<i32>>`, for instance the `borrowck-move-out-of-overloaded-auto-deref.rs` test case, I think we need to employ the UFCS way. The actual test case is: ```rust //@ run-rustfix use std::rc::Rc; pub fn main() { let _x = Rc::new(vec![1, 2]).into_iter(); //~^ ERROR [E0507] } ``` And another error will be shown if we simply use the simple `.clone()` pattern. Like: ```rust use std::rc::Rc; pub fn main() { let _x = Rc::new(vec![1, 2]).clone().into_iter(); } ``` then we will get ``` error[E0507]: cannot move out of an `Rc` --> src/main.rs:5:14 | 5 | let _x = Rc::new(vec![1, 2]).clone().into_iter(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------- value moved due to this method call | | | move occurs because value has type `Vec<i32>`, which does not implement the `Copy` trait | note: `into_iter` takes ownership of the receiver `self`, which moves value --> /playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/collect.rs:310:18 | 310 | fn into_iter(self) -> Self::IntoIter; | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 5 - let _x = Rc::new(vec![1, 2]).clone().into_iter(); 5 + let _x = <Vec<i32> as Clone>::clone(&Rc::new(vec![1, 2])).into_iter(); | For more information about this error, try `rustc --explain E0507`. ``` [Rust Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=7e767bed3f1c573c03642f20f454ed03) In this case, `Rc::clone` only increments the reference count and returns a new `Rc<Vec<i32>>`; it does not grant ownership of the inner `Vec<i32>`. As a result, calling into_iter() attempts to move the `Vec<i32>`, leading to the same E0507 error again. On the other hand, in UFCS form: ``` <Vec<i32> as Clone>::clone(&Rc::new(vec![1, 2])).into_iter() ``` This explicitly calls `<Vec<i32> as Clone>::clone`, and the argument `&Rc<Vec<i32>>` is treated as `&Vec<i32>` via Rc’s `Deref` implementation. As a result, the `Vec<i32>` itself is cloned, yielding an owned `Vec<i32>`, which allows `into_iter()` to succeed, if my understanding is correct. I addressed the issue as far as I could find the edge cases but please advice me if I'm overlooking something.
Exposing Float Masks Tracking issue: rust-lang#154064 ACP: rust-lang/libs-team#753
…illot Handle index projections in call destinations in DSE Since call destinations are evaluated after call arguments, we can't turn copy arguments into moves if the same local is later used as an index projection in the call destination. DSE call arg optimization: rust-lang#113758 r? @cjgillot cc @RalfJung
bootstrap: Don't clone submodules unconditionally in dry-run This made it very annoying to debug bootstrap itself, because every `--dry-run` invocation would start out by cloning LLVM, which is almost never necessary. Instead change a few Steps to properly support dry_run when no submodule is checked out. I tested this by running all of `check`, `build`, `doc`, `dist`, `install`, `vendor`, `clippy`, `fix`, and `miri` with `--dry-run`.
…youxu Account for `GetSyntheticValue` failures `GetSyntheticValue` returns an invalid `SBValue` if no synthetic is present. That wasn't a problem before when we were attaching synthetics to every type, but it won't be the case once github.com/rust-lang/pull/155336 or similar lands. Additionally, codelldb subverts `lldb_commands` to apply similar behavior that doesn't attach synthetics to every type, so this fixes a regression there too. Additionally, I removed 1 useless instance of `GetSyntheticValue`, since pointers should always be `IndirectionSyntheticProvider`, not `DefaultSyntheticProvider`.
Pass fields to `is_tuple_fields` instead of `SBValue` object straightforward fix for a logic error. `is_tuple_fields` expects a `list`, so we pass that in instead of the value object. Coincidentally, this also fixes one of the 3 DI tests that fails on `x86_64-pc-windows-gnu` (`tests/debuginfo/union-smoke.rs`)
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 0a4ee3f74b 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 0a4ee3f (parent) -> 7e0430f (this PR) Test differencesShow 753 test diffsStage 1
Stage 2
Additionally, 750 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7e0430fafc66bd0fdfaff94e65148a1f207438cd --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (7e0430f): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (secondary -0.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.0%, secondary -20.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 492.019s -> 491.487s (-0.11%) |
Successful merges:
GetSyntheticValuefailures #155737 (Account forGetSyntheticValuefailures)is_tuple_fieldsinstead ofSBValueobject #155738 (Pass fields tois_tuple_fieldsinstead ofSBValueobject)r? @ghost
Create a similar rollup