Forbid manual Unpin impls for structurally pinned types#149263
Forbid manual Unpin impls for structurally pinned types#149263rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Unpin impls for structurally pinned types#149263Conversation
|
The change itself seems simple, but I'd prefer to have someone from t-types review it. If no-one there feels like they have the capacity, feel free to assign it back to me. |
|
☔ The latest upstream changes (presumably #146348) made this pull request unmergeable. Please resolve the merge conflicts. |
f0b30c4 to
522ff7b
Compare
This comment has been minimized.
This comment has been minimized.
|
r? BoxyUwU |
|
What's the reason for wanting to forbid such |
|
It is for soundness concern. For a type |
|
If its soundness critical, I would add tests for impls of unpin for type aliases for adts marked pin_v2, e.g. rn your logic implicitly ignores all the cases where the self type is a non-adt 🤔 which I think is fine because we enforce that impls of |
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
522ff7b to
4def78a
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
4def78a to
636e7b2
Compare
This comment has been minimized.
This comment has been minimized.
636e7b2 to
e12acb9
Compare
|
@rustbot ready |
|
@bors r+ rollup |
…BoxyUwU Forbid manual `Unpin` impls for structurally pinned types Part of [`pin_ergonomics`](rust-lang#130494). It forbids to `impl Unpin for T` where `T` is an ADT marked with `#[pin_v2]`.
…BoxyUwU Forbid manual `Unpin` impls for structurally pinned types Part of [`pin_ergonomics`](rust-lang#130494). It forbids to `impl Unpin for T` where `T` is an ADT marked with `#[pin_v2]`.
…BoxyUwU Forbid manual `Unpin` impls for structurally pinned types Part of [`pin_ergonomics`](rust-lang#130494). It forbids to `impl Unpin for T` where `T` is an ADT marked with `#[pin_v2]`.
…BoxyUwU Forbid manual `Unpin` impls for structurally pinned types Part of [`pin_ergonomics`](rust-lang#130494). It forbids to `impl Unpin for T` where `T` is an ADT marked with `#[pin_v2]`.
…uwer Rollup of 13 pull requests Successful merges: - #152034 (Show largest job duration changes in hours and minutes in the post-merge report) - #152039 (coverage: Add a test case for a previously-unknown span mismatch) - #152045 (Convert to inline diagnostics in `rustc_infer`) - #149263 (Forbid manual `Unpin` impls for structurally pinned types) - #151754 (Check proj's parent is trait or not when checking dyn compatibility) - #151848 (Port `rustc_mir` to attribute parser) - #151874 (error on unsized AnonConsts) - #151944 (Convert to inline diagnostics in `rustc_attr_parsing`) - #152012 (Use `DEVELOPER_DIR` instead of a custom `xcode-select` script) - #152019 (`NativeLib` cleanups) - #152029 (disable socket tests in Miri) - #152041 (Convert to inline diagnostics in `rustc_query_system`) - #152050 (Try to fix `rustdoc-gui/globals.goml` flakyness) Failed merges: - #152046 (Use glob imports for attribute parsers)
…uwer Rollup of 12 pull requests Successful merges: - #152034 (Show largest job duration changes in hours and minutes in the post-merge report) - #152039 (coverage: Add a test case for a previously-unknown span mismatch) - #152045 (Convert to inline diagnostics in `rustc_infer`) - #149263 (Forbid manual `Unpin` impls for structurally pinned types) - #151754 (Check proj's parent is trait or not when checking dyn compatibility) - #151848 (Port `rustc_mir` to attribute parser) - #151874 (error on unsized AnonConsts) - #151944 (Convert to inline diagnostics in `rustc_attr_parsing`) - #152019 (`NativeLib` cleanups) - #152029 (disable socket tests in Miri) - #152041 (Convert to inline diagnostics in `rustc_query_system`) - #152050 (Try to fix `rustdoc-gui/globals.goml` flakyness) Failed merges: - #152046 (Use glob imports for attribute parsers)
…uwer Rollup of 12 pull requests Successful merges: - #152034 (Show largest job duration changes in hours and minutes in the post-merge report) - #152039 (coverage: Add a test case for a previously-unknown span mismatch) - #152045 (Convert to inline diagnostics in `rustc_infer`) - #149263 (Forbid manual `Unpin` impls for structurally pinned types) - #151754 (Check proj's parent is trait or not when checking dyn compatibility) - #151848 (Port `rustc_mir` to attribute parser) - #151874 (error on unsized AnonConsts) - #151944 (Convert to inline diagnostics in `rustc_attr_parsing`) - #152019 (`NativeLib` cleanups) - #152029 (disable socket tests in Miri) - #152041 (Convert to inline diagnostics in `rustc_query_system`) - #152050 (Try to fix `rustdoc-gui/globals.goml` flakyness) Failed merges: - #152046 (Use glob imports for attribute parsers)
|
@rust-timer build 95dcb3b |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (95dcb3b): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.5%, secondary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 1.8%, secondary -2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 471.991s -> 473.254s (0.27%) |
Part of
pin_ergonomics. It forbids toimpl Unpin for TwhereTis an ADT marked with#[pin_v2].