Skip to content

Commit b63868d

Browse files
committed
Auto merge of #5566 - oli-obk:sync-from-rustc, r=flip1995
Update to rustc changes changelog: none So, turns out `git subtree push` dies in various interesting ways, but the source cause is that the rustc repo looks like ``` --- A --- B --- C --- \--- D ---/ ``` where `B` is the commit where I added clippy to rustc and `D` is an arbitrary other PR and `C` is the master branch (or an earlier commit in it). When we now do `git subtree push`, it doesn't stop looking for things to merge at `B` as it needs to look at `D`, too, but then the bad thing happens, and it doesn't stop at `A` either, and just goes on looking at the entire history of rustc in a recursive bash script. That recursion then quickly runs into a stack overflow. While we can increase the stack size via `ulimit -s 60000`, that just means I was waiting for 30 minutes looking at `git subtree push` counting up the number of commits it has looked at. I aborted that, as a process that needs 30 mins for a push is not reasonable. This PR cheats by just doing a `cp -r ../rustc/src/tools/clippy/* .` inside my clippy checkout and committing all changes. I'm working on getting us a better workflow, but until then, this workaround will work nicely. Note that this requires a `git subrepo pull` to have occurred in the `rustc` checkout. It's not necessary to merge that pull in order to update clippy, it's just necessary in order to not revert code in the clippy repo that hasn't been synced yet to the rustc repo.
2 parents 76ddac5 + 780a63a commit b63868d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

clippy_lints/src/redundant_clone.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ struct PossibleBorrowerMap<'a, 'tcx> {
591591
impl PossibleBorrowerMap<'_, '_> {
592592
/// Returns true if the set of borrowers of `borrowed` living at `at` matches with `borrowers`.
593593
fn only_borrowers(&mut self, borrowers: &[mir::Local], borrowed: mir::Local, at: mir::Location) -> bool {
594-
self.maybe_live.seek_after(at);
594+
self.maybe_live.seek_after_primary_effect(at);
595595

596596
self.bitset.0.clear();
597597
let maybe_live = &mut self.maybe_live;

tests/ui/builtin-type-shadow.stderr

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ LL | 42
1818
|
1919
= note: expected type parameter `u32`
2020
found type `{integer}`
21-
= help: type parameters must be constrained to match other types
22-
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
2321

2422
error: aborting due to 2 previous errors
2523

0 commit comments

Comments
 (0)