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

Rollup of 10 pull requests #77222

Closed
wants to merge 39 commits into from
Closed

Conversation

RalfJung
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

ltratt and others added 30 commits August 12, 2020 15:07
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 <[email protected]>
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.
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/
@RalfJung
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Sep 26, 2020

📌 Commit 644b592 has been approved by RalfJung

@rustbot rustbot added the rollup A PR which is a rollup label Sep 26, 2020
@bors 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
@bors
Copy link
Contributor

bors commented Sep 26, 2020

⌛ Testing commit 644b592 with merge 3b3d9237b6c6388f27989b03b471830610bc0aad...

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

(PR CI failure is a network issue)

@bors
Copy link
Contributor

bors commented Sep 26, 2020

💔 Test failed - checks-actions

@bors 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
@RalfJung
Copy link
Member Author

Another network failure
Cc @rust-lang/infra
@bors retry

@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 Sep 26, 2020
@RalfJung RalfJung closed this Sep 26, 2020
@RalfJung RalfJung deleted the rollup-0idjig7 branch September 26, 2020 10:57
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.