Skip to content
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

Update Clippy #115183

Merged
merged 107 commits into from
Aug 29, 2023
Merged

Update Clippy #115183

merged 107 commits into from
Aug 29, 2023

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Aug 24, 2023

r? @oli-obk Assigning you, because something broke with ui_test:

tests/ui/crashes/ice-7272.rs FAILED:
command: "<unknown>"

A bug in `ui_test` occurred: called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }

full stderr:

(and that 103 times)

Thought I would ping you, before starting to investigate. Maybe you know what's going on.

petrochenkov and others added 30 commits August 9, 2023 14:17
Removes a piece of mutable state.
Follow up to rust-lang#114578.
…mpiler-errors

Rollup of 5 pull requests

Successful merges:

 - rust-lang#114194 (Inline trivial (noop) flush calls)
 - rust-lang#114257 (Avoid using `ptr::Unique` in `LinkedList` code)
 - rust-lang#114359 ([library/std] Replace condv while loop with `cvar.wait_while`.)
 - rust-lang#114402 (Fix documentation of impl From<Vec<T>> for Rc<[T]>)
 - rust-lang#114715 (Revert clippy lint [`filter_map_bool_then`])

r? `@ghost`
`@rustbot` modify labels: rollup
Update ui test crate

This update also removes the `//`@run-rustfix`` flag, and just runs rustfix on all tests. This means I had to opt out of running rustfix on ~100 tests, but it also allowed me to remove the rustfix coverage check entirely, as it is now effectively builtin.

changelog: update ui-test crate to 0.13 (automatically runs rustfix on all tests)
Fix SPEEDTEST instructions and output

* `--nocapture` hasn't been needed anymore since forever (even before `ui_test`)
* the result was dividing by 1000 instead of the number of test runs, giving bogus (but still useful for the purpose) timing results.

changelog: fix SPEEDTEST instructions and output
Now that generics and lifetimes are output as expected, the lint
should be applicable.
refactor: rename variable

chore: reorder

test: update naming for msrv
…p1995

Do not bless by default in ui tests

This restores the default behaviour to check the `.stderr`, it was changed in rust-lang#11239 to bless by default in `cargo test` (unless in github actions), but check by default in `cargo uitest` which is fairly confusing

It also meant `cargo uitest -F internal` no longer worked

`--bless` prevents the use of `Args::test` but we can look at reintegrating with that after `@oli-obk's` vacation

r? `@flip1995`

changelog: none
…lexendoo

[`manual_retain`]: add lint case for `binary_heap`

Closes rust-lang#9059

This PR adds changes to perform linting on the `binary_heap` as well, under the [manual_retain rule](https://rust-lang.github.io/rust-clippy/master/index.html#/manual_retain).

changelog: [manual_retain]: update for lint `binary_heap`
…nd()

Key idea:
```
// before
iter.cloned().filter(|x| unimplemented!() )
// after
iter.filter(|&x| unimplemented!() ).cloned()

// before
iter.cloned().filter( foo )
// after
iter.filter(|&x| foo(x) ).cloned()
```
 [iter_overeager_cloned]: detect `.cloned().filter()` and `.cloned().find()`

changelog: [`iter_overeager_cloned`]: detect `.cloned().filter()` and `.cloned().find()`

Key idea:
```
// before
iter.cloned().filter(|x| unimplemented!() )
// after
iter.filter(|&x| unimplemented!() ).cloned()

// before
iter.cloned().filter( foo )
// after
// notice `iter` must be `Iterator<Item= &T>` (callee of `cloned()`)
// so the parameter in the closure of `filter` must be `&&T`
// so the deref is safe
iter.filter(|&x| foo(x) ).cloned()
```
@flip1995
Copy link
Member Author

@Manishearth
Copy link
Member

r=me but looks like we have CI issues

@oli-obk
Copy link
Contributor

oli-obk commented Aug 24, 2023

Looks like I messed up something with aux file paths: https://github.com/oli-obk/ui_test/blob/a18ef37bf3dcccf5a1a631eddd55759fe0b89617/src/lib.rs#L479

@oli-obk
Copy link
Contributor

oli-obk commented Aug 29, 2023

@bors r=Manishearth,oli-obk

@bors
Copy link
Contributor

bors commented Aug 29, 2023

📌 Commit 4fdb4ed has been approved by Manishearth,oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2023
@matthiaskrgr
Copy link
Member

@bors p=1

@bors
Copy link
Contributor

bors commented Aug 29, 2023

⌛ Testing commit 4fdb4ed with merge b2515fa...

@bors
Copy link
Contributor

bors commented Aug 29, 2023

☀️ Test successful - checks-actions
Approved by: Manishearth,oli-obk
Pushing b2515fa to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b2515fa): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.9% [0.9%, 2.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 630.431s -> 631.565s (0.18%)
Artifact size: 315.96 MiB -> 315.99 MiB (0.01%)

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2023
[`Clippy`] Use symbols intended for `arithmetic_side_effects`

rust-lang#115177 added the symbols for `arithmetic_side_effects` and now this PR actually uses them to prevent an eventual removal. All because rust-lang#115183 was recently merged and next Clippy update will probably take some time to happen.

Fixes rust-lang/rust-clippy#11392
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 7, 2023
…-obk

Update Clippy

r? `@oli-obk` Assigning you, because something broke with ui_test:

```
tests/ui/crashes/ice-7272.rs FAILED:
command: "<unknown>"

A bug in `ui_test` occurred: called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }

full stderr:

```

(and that 103 times)

Thought I would ping you, before starting to investigate. Maybe you know what's going on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.