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

Uplift clippy::undropped_manually_drops lint #111530

Merged
merged 3 commits into from Jun 9, 2023

Conversation

Urgau
Copy link
Contributor

@Urgau Urgau commented May 13, 2023

This PR aims at uplifting the clippy::undropped_manually_drops lint.

undropped_manually_drops

(deny-by-default)

The undropped_manually_drops lint check for calls to std::mem::drop with a value of std::mem::ManuallyDrop which doesn't drop.

Example

struct S;
drop(std::mem::ManuallyDrop::new(S));

Explanation

ManuallyDrop does not drop it's inner value so calling std::mem::drop will not drop the inner value of the ManuallyDrop either.


Mostly followed the instructions for uplifting an clippy lint described here: #99696 (review)

@rustbot label: +I-lang-nominated
r? compiler


For Clippy:

changelog: Moves: Uplifted clippy::undropped_manually_drops into rustc

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 13, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. label May 13, 2023
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented May 13, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@asquared31415
Copy link
Contributor

ManuallyDrop doesn't not drop it's inner value

I think this part of the description is incorrect? Should it be "ManuallyDrop does not drop its inner value ..."?

@Urgau Urgau force-pushed the uplift_undropped_manually_drops branch from 73023c7 to b5d6061 Compare May 14, 2023 10:40
@tmandry

This comment was marked as outdated.

@tmandry tmandry added T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 16, 2023
@tmandry
Copy link
Member

tmandry commented May 16, 2023

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented May 16, 2023

Team member @tmandry has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 16, 2023
@scottmcm
Copy link
Member

Didn't I see some lints go by recently that lint for using drop on things that are Copy? Might it make sense for this to be just part of that lint? Something like "promised it won't be needs_drop" instead of Copy?

Or if this is worth adding separately, maybe it would make sense to give it a higher default level as a "this is a specific mistake that people make" deny lint rather than a "this is useless" warn lint?

@Urgau
Copy link
Contributor Author

Urgau commented May 16, 2023

Didn't I see some lints go by recently that lint for using drop on things that are Copy?

Yes, it was #109732

Might it make sense for this to be just part of that lint? Something like "promised it won't be needs_drop" instead of Copy?

Well, it uplifted 4 lints, clippy::{drop,forget}_{ref,copy}. They could maybe be merged into one or two lint(s) if desired. I could see a reason for grouping by method but don't think this lint should be part of any of them since undropped_manually_drops detects obvious mistake while the other aren't not at the same level of "obvious mistake" (dropping a ref isn't wrong it's just useless, dropping a ManuallyDrop is useless but also surely a mistake).

Or if this is worth adding separately, maybe it would make sense to give it a higher default level as a "this is a specific mistake that people make" deny lint rather than a "this is useless" warn lint?

Yes, sure. My take on the default level was "does it cause UB? yes -> deny; no -> warn" but since this lint catch's a so obvious mistake that no-one would have ever wrote this intentionally, it could make sense to make it deny-by-default.

@scottmcm
Copy link
Member

Yeah, we have a couple of other deny-by-default lints like that. For example,

  • unused binding from match pattern: warning
  • unused binding from match pattern, but spelled exactly the same as a variant of the type it's matching against: deny (and suggest replacing A => with Foo::A => )

When there's a super-specific suggestion we can give (here to use ManuallyDrop::drop instead of mem::drop) because it's a known pattern, I think deny-by-default makes good sense.

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels May 16, 2023
@rfcbot
Copy link

rfcbot commented May 16, 2023

🔔 This is now entering its final comment period, as per the review above. 🔔

@Urgau
Copy link
Contributor Author

Urgau commented May 16, 2023

Yeah, we have a couple of other deny-by-default lints like that.

[..]

When there's a super-specific suggestion we can give (here to use ManuallyDrop::drop instead of mem::drop) because it's a known pattern, I think deny-by-default makes good sense.

Make sense, I will change it to deny-by-default.

(btw, the suggestion here is ManuallyDrop::into_inner not ManuallyDrop::drop as the lint only triggers on owned ManuallyDrop, the ref cases and handled by the other lints)

@Urgau Urgau force-pushed the uplift_undropped_manually_drops branch from b5d6061 to 401c2cc Compare May 17, 2023 12:45
@bors
Copy link
Contributor

bors commented May 20, 2023

☔ The latest upstream changes (presumably #111799) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

@rustbot label -I-lang-nominated

@rustbot rustbot removed the I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. label May 23, 2023
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels May 26, 2023
@Urgau Urgau force-pushed the uplift_undropped_manually_drops branch from ad2f8c7 to d9d1c76 Compare June 8, 2023 09:42
@Urgau
Copy link
Contributor Author

Urgau commented Jun 8, 2023

(delegate still works even though bors didn't comment, just use @bors r=compiler-errors when this is ready to go)

unfortunately it won't work since you have used @rustbot and not @bors (unless I'm missing something)

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 8, 2023
@GuillaumeGomez
Copy link
Member

@compiler-errors I think it was supposed to be done using bors and not rustbot. ;)

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Jun 9, 2023

📌 Commit d9d1c76 has been approved by compiler-errors

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 Jun 9, 2023
@bors
Copy link
Contributor

bors commented Jun 9, 2023

⌛ Testing commit d9d1c76 with merge d7ad9d9...

@compiler-errors
Copy link
Member

compiler-errors commented Jun 9, 2023

🤦

Whoops, sorry, I mixed "compiler-errors makes a typo" up with the actual "bors delegate doesn't tell you the delegate succeeded" bug (https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/bors.20ignoring.20.60delegate.2B.60.3F) -- thx @GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jun 9, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing d7ad9d9 to master...

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

Finished benchmarking commit (d7ad9d9): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

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

mean range count
Regressions ❌
(primary)
0.7% [0.6%, 0.7%] 3
Regressions ❌
(secondary)
0.5% [0.3%, 0.6%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.6%, 0.7%] 3

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)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) - - 0

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
Regressions ❌
(secondary)
2.1% [1.9%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 647.29s -> 649.935s (0.41%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 9, 2023
@pnkfelix
Copy link
Member

  • only primary benchmark to regress was helloworld (3 incr check variants), and not by all that much (relatively speaking)
  • secondary regressions were solely to unify-linearly, await-call-tree, token-stream-stress.
  • impact seems acceptable (one expects new lint to add some amount of extra work, and I wouldn't be surprised if this is actually noise,. given Misc HIR typeck type mismatch tweaks #112116 above).
  • marking as triaged.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 13, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jun 15, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 30, 2023
…s, r=compiler-errors

Uplift `clippy::undropped_manually_drops` lint

This PR aims at uplifting the `clippy::undropped_manually_drops` lint.

## `undropped_manually_drops`

(warn-by-default)

The `undropped_manually_drops` lint check for calls to `std::mem::drop` with a value of `std::mem::ManuallyDrop` which doesn't drop.

### Example

```rust
struct S;
drop(std::mem::ManuallyDrop::new(S));
```

### Explanation

`ManuallyDrop` does not drop it's inner value so calling `std::mem::drop` will not drop the inner value of the `ManuallyDrop` either.

-----

Mostly followed the instructions for uplifting an clippy lint described here: rust-lang#99696 (review)

`@rustbot` label: +I-lang-nominated
r? compiler

-----

For Clippy:

changelog: Moves: Uplifted `clippy::undropped_manually_drops` into rustc
1715173329 added a commit to 1715173329/packages-official that referenced this pull request Aug 26, 2023
Version 1.72.0 (2023-08-24)
==========================

Language
--------

- [Replace const eval limit by a lint and add an exponential backoff warning](rust-lang/rust#103877)
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](rust-lang/rust#110141)
- [Stabilize inline asm for LoongArch64](rust-lang/rust#111235)
- [Uplift `clippy::undropped_manually_drops` lint](rust-lang/rust#111530)
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](rust-lang/rust#111543)
- [Uplift `clippy::cast_ref_to_mut` lint](rust-lang/rust#111567)
- [Uplift `clippy::cmp_nan` lint](rust-lang/rust#111818)
- [resolve: Remove artificial import ambiguity errors](rust-lang/rust#112086)
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](rust-lang/rust#112319)

Compiler
--------

- [Remember names of `cfg`-ed out items to mention them in diagnostics](rust-lang/rust#109005)
- [Support for native WASM exceptions](rust-lang/rust#111322)
- [Add support for NetBSD/aarch64-be (big-endian arm64).](rust-lang/rust#111326)
- [Write to stdout if `-` is given as output file](rust-lang/rust#111626)
- [Force all native libraries to be statically linked when linking a static binary](rust-lang/rust#111698)
- [Add Tier 3 support for `loongarch64-unknown-none*`](rust-lang/rust#112310)
- [Prevent `.eh_frame` from being emitted for `-C panic=abort`](rust-lang/rust#112403)
- [Support 128-bit enum variant in debuginfo codegen](rust-lang/rust#112474)
- [compiler: update solaris/illumos to enable tsan support.](rust-lang/rust#112039)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------

- [Document memory orderings of `thread::{park, unpark}`](rust-lang/rust#99587)
- [io: soften ‘at most one write attempt’ requirement in io::Write::write](rust-lang/rust#107200)
- [Specify behavior of HashSet::insert](rust-lang/rust#107619)
- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](rust-lang/rust#111074)
- [Update runtime guarantee for `select_nth_unstable`](rust-lang/rust#111974)
- [Return `Ok` on kill if process has already exited](rust-lang/rust#112594)
- [Implement PartialOrd for `Vec`s over different allocators](rust-lang/rust#112632)
- [Use 128 bits for TypeId hash](rust-lang/rust#109953)
- [Don't drain-on-drop in DrainFilter impls of various collections.](rust-lang/rust#104455)
- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](rust-lang/rust#106450)

Rustdoc
-------

- [Allow whitespace as path separator like double colon](rust-lang/rust#108537)
- [Add search result item types after their name](rust-lang/rust#110688)
- [Search for slices and arrays by type with `[]`](rust-lang/rust#111958)
- [Clean up type unification and "unboxing"](rust-lang/rust#112233)

Stabilized APIs
---------------

- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
- [`String::leak`](https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak)

These APIs are now stable in const contexts:

- [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_str`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)

Cargo
-----

- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
  [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
  [openwrt#12221](rust-lang/cargo#12221)
  [openwrt#12288](rust-lang/cargo#12288)
- Add support of the "default" keyword to reset previously set `build.jobs`
  parallelism back to the default.
  [openwrt#12222](rust-lang/cargo#12222)

Compatibility Notes
-------------------

- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](rust-lang/rust#112606)
- Cargo changed feature name validation check to a hard error. The warning was
  added in Rust 1.49. These extended characters aren't allowed on crates.io, so
  this should only impact users of other registries, or people who don't publish
  to a registry.
  [openwrt#12291](rust-lang/cargo#12291)

Refreshed patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
1715173329 added a commit to 1715173329/packages-official that referenced this pull request Aug 26, 2023
Version 1.72.0 (2023-08-24)
==========================

Language
--------
- [Replace const eval limit by a lint and add an exponential backoff warning](rust-lang/rust#103877)
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](rust-lang/rust#110141)
- [Stabilize inline asm for LoongArch64](rust-lang/rust#111235)
- [Uplift `clippy::undropped_manually_drops` lint](rust-lang/rust#111530)
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](rust-lang/rust#111543)
- [Uplift `clippy::cast_ref_to_mut` lint](rust-lang/rust#111567)
- [Uplift `clippy::cmp_nan` lint](rust-lang/rust#111818)
- [resolve: Remove artificial import ambiguity errors](rust-lang/rust#112086)
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](rust-lang/rust#112319)

Compiler
--------
- [Remember names of `cfg`-ed out items to mention them in diagnostics](rust-lang/rust#109005)
- [Support for native WASM exceptions](rust-lang/rust#111322)
- [Add support for NetBSD/aarch64-be (big-endian arm64).](rust-lang/rust#111326)
- [Write to stdout if `-` is given as output file](rust-lang/rust#111626)
- [Force all native libraries to be statically linked when linking a static binary](rust-lang/rust#111698)
- [Add Tier 3 support for `loongarch64-unknown-none*`](rust-lang/rust#112310)
- [Prevent `.eh_frame` from being emitted for `-C panic=abort`](rust-lang/rust#112403)
- [Support 128-bit enum variant in debuginfo codegen](rust-lang/rust#112474)
- [compiler: update solaris/illumos to enable tsan support.](rust-lang/rust#112039)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------
- [Document memory orderings of `thread::{park, unpark}`](rust-lang/rust#99587)
- [io: soften ‘at most one write attempt’ requirement in io::Write::write](rust-lang/rust#107200)
- [Specify behavior of HashSet::insert](rust-lang/rust#107619)
- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](rust-lang/rust#111074)
- [Update runtime guarantee for `select_nth_unstable`](rust-lang/rust#111974)
- [Return `Ok` on kill if process has already exited](rust-lang/rust#112594)
- [Implement PartialOrd for `Vec`s over different allocators](rust-lang/rust#112632)
- [Use 128 bits for TypeId hash](rust-lang/rust#109953)
- [Don't drain-on-drop in DrainFilter impls of various collections.](rust-lang/rust#104455)
- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](rust-lang/rust#106450)

Rustdoc
-------
- [Allow whitespace as path separator like double colon](rust-lang/rust#108537)
- [Add search result item types after their name](rust-lang/rust#110688)
- [Search for slices and arrays by type with `[]`](rust-lang/rust#111958)
- [Clean up type unification and "unboxing"](rust-lang/rust#112233)

Stabilized APIs
---------------
- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
- [`String::leak`](https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak)

These APIs are now stable in const contexts:

- [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_str`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)

Cargo
-----
- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
  [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
  [openwrt#12221](rust-lang/cargo#12221)
  [openwrt#12288](rust-lang/cargo#12288)
- Add support of the "default" keyword to reset previously set `build.jobs`
  parallelism back to the default.
  [openwrt#12222](rust-lang/cargo#12222)

Compatibility Notes
-------------------
- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](rust-lang/rust#112606)
- Cargo changed feature name validation check to a hard error. The warning was
  added in Rust 1.49. These extended characters aren't allowed on crates.io, so
  this should only impact users of other registries, or people who don't publish
  to a registry.
  [openwrt#12291](rust-lang/cargo#12291)

Refreshed patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
jefferyto pushed a commit to jefferyto/openwrt-packages that referenced this pull request Sep 21, 2023
Version 1.72.0 (2023-08-24)
==========================

Language
--------
- [Replace const eval limit by a lint and add an exponential backoff warning](rust-lang/rust#103877)
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](rust-lang/rust#110141)
- [Stabilize inline asm for LoongArch64](rust-lang/rust#111235)
- [Uplift `clippy::undropped_manually_drops` lint](rust-lang/rust#111530)
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](rust-lang/rust#111543)
- [Uplift `clippy::cast_ref_to_mut` lint](rust-lang/rust#111567)
- [Uplift `clippy::cmp_nan` lint](rust-lang/rust#111818)
- [resolve: Remove artificial import ambiguity errors](rust-lang/rust#112086)
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](rust-lang/rust#112319)

Compiler
--------
- [Remember names of `cfg`-ed out items to mention them in diagnostics](rust-lang/rust#109005)
- [Support for native WASM exceptions](rust-lang/rust#111322)
- [Add support for NetBSD/aarch64-be (big-endian arm64).](rust-lang/rust#111326)
- [Write to stdout if `-` is given as output file](rust-lang/rust#111626)
- [Force all native libraries to be statically linked when linking a static binary](rust-lang/rust#111698)
- [Add Tier 3 support for `loongarch64-unknown-none*`](rust-lang/rust#112310)
- [Prevent `.eh_frame` from being emitted for `-C panic=abort`](rust-lang/rust#112403)
- [Support 128-bit enum variant in debuginfo codegen](rust-lang/rust#112474)
- [compiler: update solaris/illumos to enable tsan support.](rust-lang/rust#112039)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------
- [Document memory orderings of `thread::{park, unpark}`](rust-lang/rust#99587)
- [io: soften ‘at most one write attempt’ requirement in io::Write::write](rust-lang/rust#107200)
- [Specify behavior of HashSet::insert](rust-lang/rust#107619)
- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](rust-lang/rust#111074)
- [Update runtime guarantee for `select_nth_unstable`](rust-lang/rust#111974)
- [Return `Ok` on kill if process has already exited](rust-lang/rust#112594)
- [Implement PartialOrd for `Vec`s over different allocators](rust-lang/rust#112632)
- [Use 128 bits for TypeId hash](rust-lang/rust#109953)
- [Don't drain-on-drop in DrainFilter impls of various collections.](rust-lang/rust#104455)
- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](rust-lang/rust#106450)

Rustdoc
-------
- [Allow whitespace as path separator like double colon](rust-lang/rust#108537)
- [Add search result item types after their name](rust-lang/rust#110688)
- [Search for slices and arrays by type with `[]`](rust-lang/rust#111958)
- [Clean up type unification and "unboxing"](rust-lang/rust#112233)

Stabilized APIs
---------------
- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
- [`String::leak`](https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak)

These APIs are now stable in const contexts:

- [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_str`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)

Cargo
-----
- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
  [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
  [openwrt#12221](rust-lang/cargo#12221)
  [openwrt#12288](rust-lang/cargo#12288)
- Add support of the "default" keyword to reset previously set `build.jobs`
  parallelism back to the default.
  [openwrt#12222](rust-lang/cargo#12222)

Compatibility Notes
-------------------
- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](rust-lang/rust#112606)
- Cargo changed feature name validation check to a hard error. The warning was
  added in Rust 1.49. These extended characters aren't allowed on crates.io, so
  this should only impact users of other registries, or people who don't publish
  to a registry.
  [openwrt#12291](rust-lang/cargo#12291)

Refreshed patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 846ee0b)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
BKPepe pushed a commit to openwrt/packages that referenced this pull request Sep 21, 2023
Version 1.72.0 (2023-08-24)
==========================

Language
--------
- [Replace const eval limit by a lint and add an exponential backoff warning](rust-lang/rust#103877)
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](rust-lang/rust#110141)
- [Stabilize inline asm for LoongArch64](rust-lang/rust#111235)
- [Uplift `clippy::undropped_manually_drops` lint](rust-lang/rust#111530)
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](rust-lang/rust#111543)
- [Uplift `clippy::cast_ref_to_mut` lint](rust-lang/rust#111567)
- [Uplift `clippy::cmp_nan` lint](rust-lang/rust#111818)
- [resolve: Remove artificial import ambiguity errors](rust-lang/rust#112086)
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](rust-lang/rust#112319)

Compiler
--------
- [Remember names of `cfg`-ed out items to mention them in diagnostics](rust-lang/rust#109005)
- [Support for native WASM exceptions](rust-lang/rust#111322)
- [Add support for NetBSD/aarch64-be (big-endian arm64).](rust-lang/rust#111326)
- [Write to stdout if `-` is given as output file](rust-lang/rust#111626)
- [Force all native libraries to be statically linked when linking a static binary](rust-lang/rust#111698)
- [Add Tier 3 support for `loongarch64-unknown-none*`](rust-lang/rust#112310)
- [Prevent `.eh_frame` from being emitted for `-C panic=abort`](rust-lang/rust#112403)
- [Support 128-bit enum variant in debuginfo codegen](rust-lang/rust#112474)
- [compiler: update solaris/illumos to enable tsan support.](rust-lang/rust#112039)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------
- [Document memory orderings of `thread::{park, unpark}`](rust-lang/rust#99587)
- [io: soften ‘at most one write attempt’ requirement in io::Write::write](rust-lang/rust#107200)
- [Specify behavior of HashSet::insert](rust-lang/rust#107619)
- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](rust-lang/rust#111074)
- [Update runtime guarantee for `select_nth_unstable`](rust-lang/rust#111974)
- [Return `Ok` on kill if process has already exited](rust-lang/rust#112594)
- [Implement PartialOrd for `Vec`s over different allocators](rust-lang/rust#112632)
- [Use 128 bits for TypeId hash](rust-lang/rust#109953)
- [Don't drain-on-drop in DrainFilter impls of various collections.](rust-lang/rust#104455)
- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](rust-lang/rust#106450)

Rustdoc
-------
- [Allow whitespace as path separator like double colon](rust-lang/rust#108537)
- [Add search result item types after their name](rust-lang/rust#110688)
- [Search for slices and arrays by type with `[]`](rust-lang/rust#111958)
- [Clean up type unification and "unboxing"](rust-lang/rust#112233)

Stabilized APIs
---------------
- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
- [`String::leak`](https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak)

These APIs are now stable in const contexts:

- [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_str`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)

Cargo
-----
- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
  [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
  [#12221](rust-lang/cargo#12221)
  [#12288](rust-lang/cargo#12288)
- Add support of the "default" keyword to reset previously set `build.jobs`
  parallelism back to the default.
  [#12222](rust-lang/cargo#12222)

Compatibility Notes
-------------------
- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](rust-lang/rust#112606)
- Cargo changed feature name validation check to a hard error. The warning was
  added in Rust 1.49. These extended characters aren't allowed on crates.io, so
  this should only impact users of other registries, or people who don't publish
  to a registry.
  [#12291](rust-lang/cargo#12291)

Refreshed patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 846ee0b)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Sep 24, 2023
Pkgsrc changes:
 * Adjust patches and cargo checksums to new versions.

Upstream changes:

Version 1.72.0 (2023-08-24)
==========================

Language
--------

- [Replace const eval limit by a lint and add an exponential backoff warning]
  (rust-lang/rust#103877)
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root]
  (rust-lang/rust#110141)
- [Stabilize inline asm for LoongArch64]
  (rust-lang/rust#111235)
- [Uplift `clippy::undropped_manually_drops` lint]
  (rust-lang/rust#111530)
- [Uplift `clippy::invalid_utf8_in_unchecked` lint]
  (rust-lang/rust#111543)
- [Uplift `clippy::cast_ref_to_mut` lint]
  (rust-lang/rust#111567)
- [Uplift `clippy::cmp_nan` lint]
  (rust-lang/rust#111818)
- [resolve: Remove artificial import ambiguity errors]
  (rust-lang/rust#112086)
- [Don't require associated types with Self: Sized bounds in `dyn
  Trait` objects]
  (rust-lang/rust#112319)

Compiler
--------

- [Remember names of `cfg`-ed out items to mention them in diagnostics]
  (rust-lang/rust#109005)
- [Support for native WASM exceptions]
  (rust-lang/rust#111322)
- [Add support for NetBSD/aarch64-be (big-endian arm64).]
  (rust-lang/rust#111326)
- [Write to stdout if `-` is given as output file]
  (rust-lang/rust#111626)
- [Force all native libraries to be statically linked when linking
  a static binary]
  (rust-lang/rust#111698)
- [Add Tier 3 support for `loongarch64-unknown-none*`]
  (rust-lang/rust#112310)
- [Prevent `.eh_frame` from being emitted for `-C panic=abort`]
  (rust-lang/rust#112403)
- [Support 128-bit enum variant in debuginfo codegen]
  (rust-lang/rust#112474)
- [compiler: update solaris/illumos to enable tsan support.]
  (rust-lang/rust#112039)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------

- [Document memory orderings of `thread::{park, unpark}`]
  (rust-lang/rust#99587)
- [io: soften â<80><98>at most one write attemptâ<80><99>
   requirement in io::Write::write]
  (rust-lang/rust#107200)
- [Specify behavior of HashSet::insert]
  (rust-lang/rust#107619)
- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>`
  and `LineWriter<T>`]
  (rust-lang/rust#111074)
- [Update runtime guarantee for `select_nth_unstable`]
  (rust-lang/rust#111974)
- [Return `Ok` on kill if process has already exited]
  (rust-lang/rust#112594)
- [Implement PartialOrd for `Vec`s over different allocators]
  (rust-lang/rust#112632)
- [Use 128 bits for TypeId hash]
  (rust-lang/rust#109953)
- [Don't drain-on-drop in DrainFilter impls of various collections.]
  (rust-lang/rust#104455)
- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata]
  (rust-lang/rust#106450)

Rustdoc
-------

- [Allow whitespace as path separator like double colon]
  (rust-lang/rust#108537)
- [Add search result item types after their name]
  (rust-lang/rust#110688)
- [Search for slices and arrays by type with `[]`]
  (rust-lang/rust#111958)
- [Clean up type unification and "unboxing"]
  (rust-lang/rust#112233)

Stabilized APIs
---------------

- [`impl<T: Send> Sync for mpsc::Sender<T>`]
  (https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
- [`impl TryFrom<&OsStr> for &str`]
  (https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
- [`String::leak`]
  (https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak)

These APIs are now stable in const contexts:

- [`CStr::from_bytes_with_nul`]
  (https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes`]
  (https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes_with_nul`]
  (https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_str`]
  (https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)

Cargo
-----

- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
  [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
  [#12221](rust-lang/cargo#12221)
  [#12288](rust-lang/cargo#12288)
- Add support of the "default" keyword to reset previously set `build.jobs`
  parallelism back to the default.
  [#12222](rust-lang/cargo#12222)

Compatibility Notes
-------------------

- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses]
  (rust-lang/rust#112606)
- Cargo changed feature name validation check to a hard error. The
  warning was added in Rust 1.49. These extended characters aren't
  allowed on crates.io, so this should only impact users of other
  registries, or people who don't publish to a registry.
  [#12291](rust-lang/cargo#12291)
lu-zero pushed a commit to domo-iot/packages that referenced this pull request Oct 23, 2023
Version 1.72.0 (2023-08-24)
==========================

Language
--------
- [Replace const eval limit by a lint and add an exponential backoff warning](rust-lang/rust#103877)
- [expand: Change how `#![cfg(FALSE)]` behaves on crate root](rust-lang/rust#110141)
- [Stabilize inline asm for LoongArch64](rust-lang/rust#111235)
- [Uplift `clippy::undropped_manually_drops` lint](rust-lang/rust#111530)
- [Uplift `clippy::invalid_utf8_in_unchecked` lint](rust-lang/rust#111543)
- [Uplift `clippy::cast_ref_to_mut` lint](rust-lang/rust#111567)
- [Uplift `clippy::cmp_nan` lint](rust-lang/rust#111818)
- [resolve: Remove artificial import ambiguity errors](rust-lang/rust#112086)
- [Don't require associated types with Self: Sized bounds in `dyn Trait` objects](rust-lang/rust#112319)

Compiler
--------
- [Remember names of `cfg`-ed out items to mention them in diagnostics](rust-lang/rust#109005)
- [Support for native WASM exceptions](rust-lang/rust#111322)
- [Add support for NetBSD/aarch64-be (big-endian arm64).](rust-lang/rust#111326)
- [Write to stdout if `-` is given as output file](rust-lang/rust#111626)
- [Force all native libraries to be statically linked when linking a static binary](rust-lang/rust#111698)
- [Add Tier 3 support for `loongarch64-unknown-none*`](rust-lang/rust#112310)
- [Prevent `.eh_frame` from being emitted for `-C panic=abort`](rust-lang/rust#112403)
- [Support 128-bit enum variant in debuginfo codegen](rust-lang/rust#112474)
- [compiler: update solaris/illumos to enable tsan support.](rust-lang/rust#112039)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

Libraries
---------
- [Document memory orderings of `thread::{park, unpark}`](rust-lang/rust#99587)
- [io: soften ‘at most one write attempt’ requirement in io::Write::write](rust-lang/rust#107200)
- [Specify behavior of HashSet::insert](rust-lang/rust#107619)
- [Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` and `LineWriter<T>`](rust-lang/rust#111074)
- [Update runtime guarantee for `select_nth_unstable`](rust-lang/rust#111974)
- [Return `Ok` on kill if process has already exited](rust-lang/rust#112594)
- [Implement PartialOrd for `Vec`s over different allocators](rust-lang/rust#112632)
- [Use 128 bits for TypeId hash](rust-lang/rust#109953)
- [Don't drain-on-drop in DrainFilter impls of various collections.](rust-lang/rust#104455)
- [Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata](rust-lang/rust#106450)

Rustdoc
-------
- [Allow whitespace as path separator like double colon](rust-lang/rust#108537)
- [Add search result item types after their name](rust-lang/rust#110688)
- [Search for slices and arrays by type with `[]`](rust-lang/rust#111958)
- [Clean up type unification and "unboxing"](rust-lang/rust#112233)

Stabilized APIs
---------------
- [`impl<T: Send> Sync for mpsc::Sender<T>`](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E)
- [`impl TryFrom<&OsStr> for &str`](https://doc.rust-lang.org/nightly/std/primitive.str.html#impl-TryFrom%3C%26'a+OsStr%3E-for-%26'a+str)
- [`String::leak`](https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.leak)

These APIs are now stable in const contexts:

- [`CStr::from_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_bytes_with_nul`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
- [`CStr::to_str`](https://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.from_bytes_with_nul)

Cargo
-----
- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
  [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-test.html#working-directory-of-tests)
  [openwrt#12221](rust-lang/cargo#12221)
  [openwrt#12288](rust-lang/cargo#12288)
- Add support of the "default" keyword to reset previously set `build.jobs`
  parallelism back to the default.
  [openwrt#12222](rust-lang/cargo#12222)

Compatibility Notes
-------------------
- [Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses](rust-lang/rust#112606)
- Cargo changed feature name validation check to a hard error. The warning was
  added in Rust 1.49. These extended characters aren't allowed on crates.io, so
  this should only impact users of other registries, or people who don't publish
  to a registry.
  [openwrt#12291](rust-lang/cargo#12291)

Refreshed patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet