-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 10 pull requests #77222
Closed
Closed
Rollup of 10 pull requests #77222
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
Triggered by a discussion on wg-unsafe-code-guidelines about which layouts of `Option<T>` one can guarantee are optimised to a single pointer.
Co-authored-by: Ralf Jung <post@ralfj.de>
Co-authored-by: Ralf Jung <post@ralfj.de>
…stead of whole format string
The main use case of TrustedLen is allowing APIs to specialize on it, but no use of it uses that specialization. Instead, only the .len() function provided by ExactSizeIterator is used, which is already required to be accurate. Thus, the TrustedLen requirement on BuilderMethods::switch is redundant.
This refactors handling of `Rvalue::{Unary,Binary}Op` in the const-checker. Now we `span_bug` if there's an unexpected type in a primitive operation. This also allows unary negation on `char` values through the const-checker because it makes the code a bit cleaner. `char` does not actually support these operations, and if it did, we could evaluate them at compile-time.
It's called `span` elsewhere in the compiler and `span` is also less surprising. `whence` is whimsical, but not super clear :)
…es, r=dtolnay Explicitly document the size guarantees that Option makes. Triggered by a discussion on wg-unsafe-code-guidelines about which layouts of `Option<T>` one can guarantee are optimised to a single pointer. CC @RalfJung
…r=davidtwco Point at named argument not found when using `format_args_capture` instead of whole format string
…s-slice-iter, r=Dylan-DPC Add missing code examples on slice iter types r? @Dylan-DPC
…r=varkor merge `need_type_info_err(_const)` I hoped that this would automatically solve rust-lang#76737 but it doesn't quite seem like it fixes rust-lang#77092 r? @varkor
… r=RalfJung,oli-obk Add `#![feature(const_fn_floating_point_arithmetic)]` cc rust-lang#76618 This is a template for splitting up `const_fn` into granular feature gates. I think this will make it easier, both for us and for users, to track stabilization of each individual feature. We don't *have* to do this, however. We could also keep stabilizing things out from under `const_fn`. cc @rust-lang/wg-const-eval r? @oli-obk
…petrochenkov Remove TrustedLen requirement from BuilderMethods::switch The main use case of TrustedLen is allowing APIs to specialize on it, but no use of it uses that specialization. Instead, only the .len() function provided by ExactSizeIterator is used, which is already required to be accurate. Thus, the TrustedLen requirement on BuilderMethods::switch is redundant.
update Miri Fixes rust-lang#77130
Remove stray word from `ClosureKind::extends` docs
Rename `whence` to `span` It's called `span` elsewhere in the compiler and `span` is also less surprising. `whence` is whimsical, but not super clear :) See [this Discord conversation](https://discord.com/channels/442252698964721669/459149231702278154/758731658689511444) for more. r? @jyn514
Remove unused #[allow(...)] statements from compiler/
📌 Commit 644b592 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 26, 2020
⌛ Testing commit 644b592 with merge 3b3d9237b6c6388f27989b03b471830610bc0aad... |
This comment has been minimized.
This comment has been minimized.
(PR CI failure is a network issue) |
💔 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 26, 2020
Another network failure |
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
Sep 26, 2020
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-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
format_args_capture
instead of whole format string #76485 (Point at named argument not found when usingformat_args_capture
instead of whole format string)need_type_info_err(_const)
#77093 (mergeneed_type_info_err(_const)
)#![feature(const_fn_floating_point_arithmetic)]
#77122 (Add#![feature(const_fn_floating_point_arithmetic)]
)ClosureKind::extends
docs #77204 (Remove stray word fromClosureKind::extends
docs)whence
tospan
#77207 (Renamewhence
tospan
)Failed merges:
#[rustc_allow_const_fn_ptr]
and add#![feature(const_fn_fn_ptr_basics)]
#77170 (Remove#[rustc_allow_const_fn_ptr]
and add#![feature(const_fn_fn_ptr_basics)]
)r? @ghost