-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 11 pull requests #88854
Closed
Closed
Rollup of 11 pull requests #88854
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
The existing documentation felt a little unhelpfully concise, so this change tries to improve it by using longer sentences, each of which specifies which kinds of types it applies to as early as possible. In particular, the third item starts with “Structs ...” instead of saying “Foo is a struct” later. Also, the previous list items “Only the last field has a type involving `T`” and “`T` is not part of the type of any other fields” are, as far as I see, redundant with each other, so I removed the latter.
Commit 95e096d changed a bunch of size checks already, but more have been added, so this fixes the new ones the same way: the various size checks that are conditional on target_arch = "x86_64" were not intended to apply to x86_64-unknown-linux-gnux32, so add target_pointer_width = "64" to the conditions.
Rustdoc doesn't require the build artifacts to generate the docs, and especially in the case of rustc, it greatly increases the time needed to run the build.
Local variables can never be exported.
Reword description of automatic impls of `Unsize`. The existing documentation felt a little unhelpfully concise, so this change tries to improve it by using longer sentences, each of which specifies which kinds of types it applies to as early as possible. In particular, the third item starts with “Structs ...” instead of saying “Foo is a struct” later. Also, the previous list items “Only the last field has a type involving `T`” and “`T` is not part of the type of any other fields” are, as far as I see, redundant with each other, so I removed the latter. I have no particular knowledge of `Unsize`; I have attempted to leave the meaning entirely unchanged but may have missed a nuance. Markdown preview of the edited documentation: > All implementations of `Unsize` are provided automatically by the compiler. > Those implementations are: > > - Arrays `[T; N]` implement `Unsize<[T]>`. > - 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.
Fix non-capturing closure return type coercion Fixes rust-lang#88097. For the example given there: ```rust fn peculiar() -> impl Fn(u8) -> u8 { return |x| x + 1 } ``` which incorrectly reports an error, I noticed something weird in the debug log: ``` DEBUG rustc_typeck::check::coercion coercion::try_find_coercion_lub([closure@test.rs:2:12: 2:21], [closure@test.rs:2:12: 2:21], exprs=1 exprs) ``` Apparently, `try_find_coercion_lub()` thinks that the LUB for two closure types always has to be a function pointer (which explains the `expected closure, found fn pointer` error in rust-lang#88097). There is one corner case where that isn't true, though — namely, when the two closure types are equal, in which case the trivial LUB is the type itself. This PR fixes this by inserting an explicit check for type equality in `try_find_coercion_lub()`.
Improve error message when _ is used for in/inout asm operands As suggested by ``@Commeownist`` in rust-lang#72016 (comment).
…ports, r=Amanieu Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues Fixes rust-lang#88304. I tested it based on rust-lang#88292. Not sure if it's the best approach, but at least it makes thing a bit simpler. cc ``@jyn514``
Change more x64 size checks to not apply to x32. Commit 95e096d changed a bunch of size checks already, but more have been added, so this fixes the new ones the same way: the various size checks that are conditional on target_arch = "x86_64" were not intended to apply to x86_64-unknown-linux-gnux32, so add target_pointer_width = "64" to the conditions.
Don't build the compiler and standard library before documenting them Rustdoc doesn't require the build artifacts to generate the docs, and especially in the case of rustc, it greatly increases the time needed to run the build. r? ``@Mark-Simulacrum`` cc ``@steffahn``
rustc: Remove local variable IDs from `Export`s Local variables can never be exported.
generic_const_exprs: use thir for abstract consts instead of mir not sure if this is handling some of the weirder `thir::ExprKind` correctly in `recurse_build` (it probably isnt) r? ``@lcnr``
Use more accurate spans for "unused delimiter" lint
Add help for E0463 Fixes rust-lang#87871. r? ``@estebank``
…chenkov don't clone types that are Copy (clippy::clone_on_copy)
@bors: r+ p=11 rollup=never |
📌 Commit 35b66f8 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Sep 11, 2021
The job Click to see the possible cause of the failure (guessed by this bot)
|
⌛ Testing commit 35b66f8 with merge 91caa5afc7abb41d1d303f006c50c8c43661f6f1... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
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
Sep 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
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.
Successful merges:
Unsize
. #87904 (Reword description of automatic impls ofUnsize
.)cfg(doc)
from std::os module reexports to fix rustdoc linking issues #88619 (Removecfg(doc)
from std::os module reexports to fix rustdoc linking issues)Export
s #88677 (rustc: Remove local variable IDs fromExport
s)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup