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

Clippy subtree sync #117979

Merged
merged 84 commits into from
Nov 16, 2023
Merged

Clippy subtree sync #117979

merged 84 commits into from
Nov 16, 2023

Conversation

flip1995
Copy link
Member

Gernot Ohner and others added 30 commits October 23, 2023 23:22
Most notably, this commit changes the `pub use crate::*;` in that file
to `use crate::*;`. This requires a lot of `use` items in other crates
to be adjusted, because everything defined within `rustc_span::*` was
also available via `rustc_span::source_map::*`, which is bizarre.

The commit also removes `SourceMap::span_to_relative_line_string`, which
is unused.
…dnet

Fix `dbg_macro` semi span calculation

`span_including_semi` was using a `BytePos` to index into a file's source which happened to work because the root file of the test started at `BytePos` 0, it didn't work for other files

changelog: none
`rustc_span` cleanups

Just some things I found while looking over this crate.

r? `@oli-obk`
[`unused_enumerate_index`]: don't ICE on empty tuples

Fixes rust-lang#11755

changelog: [`unused_enumerate_index`]: don't ICE on empty tuples

I'm going to nominate for beta backport because the code that is needed to trigger this seems likely to occur in real code
`@rustbot` label +beta-nominated
update references of old `msrvs` and `conf` paths

In rust-lang#11685, `clippy_lints::utils::conf` and `clippy_utils::msrvs` were moved to a separate `clippy_config` crate.
I noticed that not all references to those paths were updated, so this small PR intends to fix those.

changelog: none
Make SpanlessEq more consistent

1) Remove wildcard as requested in rust-lang/rust-clippy#10267.
2) Implement `hir_utils::eq_expr` for `ExprKind::Closure`, `ExprKind::ConstBlock`, `ExprKind::InlineAsm` and `ExprKind::Yield`.
3) Reorder branches of `hir_utils::eq_expr` to be in alphabetical order.

---
changelog: none
Fixes: rust-lang#11714
changelog: [`arc_with_non_send_sync`]: Suggest RC over unsafe impl

Co-authored-by: Alejandra González <blyxyas@gmail.com>
[arc_with_non_send_sync] Improve suggested resolution

Fixes: rust-lang#11714

Improved the lint message for [`arc_with_non_send_sync`] to suggest using `RC` unless user needs an Arc, then suggests wrapping in a mutex, and then suggests implementing `Sync` and `Send`.

---

changelog: [`arc_with_non_send_sync`]: Suggest RC over unsafe impl of Send and Sync
fixes: rust-lang#11775

current state: indiscriminately emits the lint for mod files in tests.

The following

tests/
  common/
    mod.rs
  test.rs

is a common pattern for code shared across the tests and is suggested in
the rust book. The change adds an additional check to verify that the
mod file is not in tests.

changelog: Fix [`mod_module_files`]: false positive for mod files in
tests folder
[`mod_module_files`] Don't emit lint for mod.rs in tests

fixes: rust-lang#11775

current state: indiscriminately emits the lint for mod files in tests.

The following

```
tests/
  common/
    mod.rs
  test.rs
```

is a common pattern for code shared across the tests and is suggested in the rust book. The change adds an additional check to verify that the mod file is not in tests.

changelog: Fix [`mod_module_files`]: false positive for mod files in tests folder
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 16, 2023
@matthiaskrgr
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Nov 16, 2023

📌 Commit 2ac2b26 has been approved by matthiaskrgr

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 Nov 16, 2023
@bors
Copy link
Contributor

bors commented Nov 16, 2023

⌛ Testing commit 2ac2b26 with merge 14d9aa9...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 16, 2023
@rust-log-analyzer
Copy link
Collaborator

The job dist-aarch64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Nov 16, 2023

💔 Test failed - checks-actions

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

@bors retry network problems again

@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 Nov 16, 2023
@bors
Copy link
Contributor

bors commented Nov 16, 2023

⌛ Testing commit 2ac2b26 with merge a577704...

@bors
Copy link
Contributor

bors commented Nov 16, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing a577704 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 16, 2023
@bors bors merged commit a577704 into rust-lang:master Nov 16, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 16, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a577704): 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.6% [0.4%, 0.7%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.1% [-4.1%, -4.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-4.1%, 0.7%] 3

Cycles

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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.4%, 0.4%] 1

Binary size

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

Bootstrap: 675.791s -> 676.528s (0.11%)
Artifact size: 313.65 MiB -> 313.61 MiB (-0.01%)

@flip1995 flip1995 deleted the clippyup branch November 17, 2023 09:36
@tmandry tmandry mentioned this pull request Nov 17, 2023
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.