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 #102729

Merged
merged 188 commits into from
Oct 7, 2022
Merged

Update Clippy #102729

merged 188 commits into from
Oct 7, 2022

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Oct 6, 2022

Jarcho and others added 30 commits September 6, 2022 14:23
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
This shrinks `hir::Ty` from 72 to 48 bytes.

`visit_lifetime` is added to the HIR stats collector because these types
are now stored in memory on their own, instead of being within other
types.
This shrinks `hir::Pat` from 88 to 72 bytes.
rustc: Parameterize `ty::Visibility` over used ID

It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
…storino

Shrink `hir::Ty` and `hir::Pat`

r? `@ghost`
Allow lint passes to be bound by `TyCtxt`

This will allow storing things like `Ty<'tcx>` inside late lint passes. It's already possible to store various id types so they're already implicitly bound to a specific `TyCtxt`.

r? rust-lang/compiler
Rollup of 7 pull requests

Successful merges:

 - rust-lang#98933 (Opaque types' generic params do not imply anything about their hidden type's lifetimes)
 - rust-lang#101041 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2)
 - rust-lang#101424 (Adjust and slightly generalize operator error suggestion)
 - rust-lang#101496 (Allow lower_lifetime_binder receive a closure)
 - rust-lang#101501 (Allow lint passes to be bound by `TyCtxt`)
 - rust-lang#101515 (Recover from typo where == is used in place of =)
 - rust-lang#101545 (Remove unnecessary `PartialOrd` and `Ord`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
…oli-obk

rustc_error, rustc_private: Switch to stable hash containers

Relates rust-lang#84447
…r=thomcc

Use `DisplayBuffer` for socket addresses.

Continuation of rust-lang#100625 for socket addresses.

Renames `net::addr` to `net::addr::socket`, `net::ip` to `net::addr::ip` and `net::ip::display_buffer::IpDisplayBuffer` to `net::addr::display_buffer::DisplayBuffer`.
…r=cjgillot

Simplify visitors more

A successor to rust-lang#100392.

r? `@cjgillot`
Initial implementation of dyn*

This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things:

* Introduce `dyn_star` feature flag
* Adds parsing for `dyn* Trait` types
* Defines `dyn* Trait` as a sized type
* Adds support for explicit casts, like `42usize as dyn* Debug`
  * Including const evaluation of such casts
* Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope
* Adds codegen for method calls, at least for methods that take `&self`

Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits.

Joint work with `@nikomatsakis` and `@compiler-errors.`

r? `@bjorn3`
Clippy pre beta branch fix

Before beta is branched on Friday, I want to move the `unused_peekable` lint  that was added in this release cycle (1.65) to `nursery`. This lint was already reported twice (rust-lang/rust-clippy#9456, rust-lang/rust-clippy#9462) in a short time, so it is probably a good idea to fix it before it hits beta and then stable.

r? `@Manishearth`
…ed_opaque_type, r=estebank""

This reverts commit 4a742a6.
nyurik added a commit to nyurik/rust-clippy that referenced this pull request Oct 6, 2022
per suggestion in
rust-lang/rust#102729 (comment)

workaround for an internal crash when handling multi-line format
argument inlining.
nyurik and others added 2 commits October 6, 2022 09:24
per suggestion in
rust-lang#102729 (comment)

workaround for an internal crash when handling multi-line format
argument inlining.
Add a temporary workaround for  multiline formart arg inlining

per suggestion in
rust-lang#102729 (comment)

workaround for an internal crash when handling multi-line format argument inlining.

changelog: none

(no point for changelog because it is still a new lint being introduced)
@Manishearth
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Oct 6, 2022

📌 Commit db490d0 has been approved by Manishearth

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 Oct 6, 2022
@Manishearth
Copy link
Member

Oh wait hasn't resynced yet

lint::unsafe_removed_from_name: fix false positive result when allowed

changelog: [`unsafe_removed_from_name`] Fix allowing on imports produces a false positive on `useless_attribute`.

Fixes: rust-lang#9197

Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
@Manishearth
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 6, 2022
@nyurik
Copy link
Contributor

nyurik commented Oct 6, 2022

Because Rust CI enables debug stuff like overflow checking. In Clippy we use a release compiled rustc.

@flip1995 can we add a debug build of rustc to clippy CI?

@flip1995
Copy link
Member Author

flip1995 commented Oct 6, 2022

As rarely as things break in debug mode (about 1-2x a year), it wouldn't be worth the effort.

@nyurik
Copy link
Contributor

nyurik commented Oct 6, 2022

I guess as long as it gets caught before being sent to the users, its ok

@flip1995
Copy link
Member Author

flip1995 commented Oct 6, 2022

@Manishearth Now it is resynced. Tests pass locally, however I did not test with debug, so maybe we should wait on CI before approving.

@Manishearth
Copy link
Member

@bors r+

seems to pass

@bors
Copy link
Contributor

bors commented Oct 6, 2022

📌 Commit 2b30ce0 has been approved by Manishearth

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 6, 2022
@bors
Copy link
Contributor

bors commented Oct 6, 2022

⌛ Testing commit 2b30ce0 with merge 233384f...

@bors
Copy link
Contributor

bors commented Oct 7, 2022

☀️ Test successful - checks-actions
Approved by: Manishearth
Pushing 233384f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 7, 2022
@bors bors merged commit 233384f into rust-lang:master Oct 7, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 7, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (233384f): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.5%, -2.2%] 2
All ❌✅ (primary) - - 0

Cycles

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

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

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.