-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Clarify Unsize
documentation
#117495
Merged
Merged
Clarify Unsize
documentation
#117495
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
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.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
Nov 1, 2023
r? libs-api |
rustbot
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
Nov 1, 2023
This was referenced Nov 1, 2023
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 2, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 2, 2023
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#117394 (use global cache when computing proof trees) - rust-lang#117495 (Clarify `Unsize` documentation) - rust-lang#117509 (Remove support for alias `-Z symbol-mangling-version`) - rust-lang#117512 (Expand mem::offset_of! docs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 2, 2023
Rollup merge of rust-lang#117495 - compiler-errors:unsize-docs, r=lcnr Clarify `Unsize` documentation The documentation erroneously says that: ```rust /// - Types implementing a trait `Trait` also implement `Unsize<dyn Trait>`. /// - Structs `Foo<..., T, ...>` implement `Unsize<Foo<..., U, ...>>` if all of these conditions /// are met: /// - `T: Unsize<U>`. /// - Only the last field of `Foo` has a type involving `T`. /// - `Bar<T>: Unsize<Bar<U>>`, where `Bar<T>` stands for the actual type of that last field. ``` Specifically, `T: Unsize<U>` is not required to hold -- only the final field must implement `FinalField<T>: Unsize<FinalField<U>>`. This can be demonstrated by the test I added. --- Second commit fleshes out the documentation a lot more.
bors-ferrocene bot
added a commit
to ferrocene/ferrocene
that referenced
this pull request
Nov 3, 2023
82: Automated pull from upstream `master` r=tshepang a=github-actions[bot] This PR pulls the following changes from the upstream repository: * rust-lang/rust#117313 * rust-lang/rust#117131 * rust-lang/rust#117134 * rust-lang/rust#117471 * rust-lang/rust#117521 * rust-lang/rust#117513 * rust-lang/rust#117512 * rust-lang/rust#117509 * rust-lang/rust#117495 * rust-lang/rust#117394 * rust-lang/rust#117466 * rust-lang/rust#117204 * rust-lang/rust#117386 * rust-lang/rust#117506 Co-authored-by: Nicholas Nethercote <n.nethercote@gmail.com> Co-authored-by: roblabla <unfiltered@roblab.la> Co-authored-by: Michael Goulet <michael@errs.io> Co-authored-by: massivebird <gdrakemail@gmail.com> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com> Co-authored-by: lcnr <rust@lcnr.de> Co-authored-by: Joshua Liebow-Feeser <joshlf@users.noreply.github.com> Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The documentation erroneously says that:
Specifically,
T: Unsize<U>
is not required to hold -- only the final field must implementFinalField<T>: Unsize<FinalField<U>>
. This can be demonstrated by the test I added.Second commit fleshes out the documentation a lot more.