Rollup of 7 pull requests#151701
Conversation
Explicitly writing `self.tcx` is easy enough, and lets us remove a bit of non-essential deref magic.
Based on earlier work by León Orell Valerian Liehr. Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Signed-off-by: Usman Akinyemi <uniqueusman@archlinux>
When encountering a call to `iter` that should have been `into_iter` and vice-versa, provide a structured suggestion:
```
error[E0271]: type mismatch resolving `<IntoIter<{integer}, 3> as IntoIterator>::Item == &{integer}`
--> $DIR/into_iter-when-iter-was-intended.rs:5:37
|
LL | let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
| ----- ^^^^^^^^^^^^^^^^^^^^^ expected `&{integer}`, found integer
| |
| required by a bound introduced by this call
|
note: the method call chain might not have had the expected associated types
--> $DIR/into_iter-when-iter-was-intended.rs:5:47
|
LL | let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
| --------- ^^^^^^^^^^^ `IntoIterator::Item` is `{integer}` here
| |
| this expression has type `[{integer}; 3]`
note: required by a bound in `std::iter::Iterator::chain`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: consider not consuming the `[{integer}, 3]` to construct the `Iterator`
|
LL - let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
LL + let _a = [0, 1, 2].iter().chain([3, 4, 5].iter());
|
```
Recover from struct literals with placeholder or empty path Based on earlier work by León Orell Valerian Liehr.
…r=petrochenkov Remove uses of `&mut CmResolver` Before rust-lang#148329, using CmResolver in closures was not possible when trying to reborrow. This pr changes uses of `&mut CmResolver` into a bare `CmResolver`, to keep the code clean (and to not have `&mut &mut Resolver`) r? @petrochenkov
…yotamofek Rustdoc performance improvements A few things I had sitting around for a while. Let's check what perf says about them r? @yotamofek
some more rustc_borrowck cleanups r? lcnr
Fix sanitizer target builds on CI
Remove `Deref<Target = TyCtxt>` from `QueryCtxt` Explicitly writing `self.tcx` is easy enough, and lets us remove a bit of non-essential deref magic.
Suggest changing `iter`/`into_iter` when the other was meant
When encountering a call to `iter` that should have been `into_iter` and vice-versa, provide a structured suggestion:
```
error[E0271]: type mismatch resolving `<IntoIter<{integer}, 3> as IntoIterator>::Item == &{integer}`
--> $DIR/into_iter-when-iter-was-intended.rs:5:37
|
LL | let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
| ----- ^^^^^^^^^^^^^^^^^^^^^ expected `&{integer}`, found integer
| |
| required by a bound introduced by this call
|
note: the method call chain might not have had the expected associated types
--> $DIR/into_iter-when-iter-was-intended.rs:5:47
|
LL | let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
| --------- ^^^^^^^^^^^ `IntoIterator::Item` is `{integer}` here
| |
| this expression has type `[{integer}; 3]`
note: required by a bound in `std::iter::Iterator::chain`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: consider not consuming the `[{integer}, 3]` to construct the `Iterator`
|
LL - let _a = [0, 1, 2].iter().chain([3, 4, 5].into_iter());
LL + let _a = [0, 1, 2].iter().chain([3, 4, 5].iter());
|
```
Finish addressing the original case in rust-lang#68095. Only the case of chaining a `Vec` or `[]` is left unhandled.
|
@bors r+ rollup=never p=5 |
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
@bors retry |
|
❗ You can only retry pull requests that are approved and have a previously failed auto build. Hint: There is currently a pending auto build on this PR. To cancel it, run |
|
Whoops I read that wrong, RLA has been a bit behind today. Anyway we got the official "resolved" note #t-infra > github status @ 💬 |
|
📌 Perf builds for each rolled up PR:
previous master: 474276961f 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 4742769 (parent) -> b3cda16 (this PR) Test differencesShow 86 test diffsStage 0
Stage 1
Stage 2
Additionally, 40 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 b3cda168c8afd5c4240a9477f6a7f54e70e2589a --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 |
|
Yay! |
|
Tree is now open for merging. |
|
Finished benchmarking commit (b3cda16): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.0%, secondary -1.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -6.4%, secondary -3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 473.418s -> 472.506s (-0.19%) |
Successful merges:
&mut CmResolver#148187 (Remove uses of&mut CmResolver)Deref<Target = TyCtxt>fromQueryCtxt#151626 (RemoveDeref<Target = TyCtxt>fromQueryCtxt)iter/into_iterwhen the other was meant #151661 (Suggest changingiter/into_iterwhen the other was meant)r? @ghost
Create a similar rollup