Skip to content

Rollup of 10 pull requests - #77222

Closed
RalfJung wants to merge 39 commits into
rust-lang:masterfrom
RalfJung:rollup-0idjig7
Closed

Rollup of 10 pull requests#77222
RalfJung wants to merge 39 commits into
rust-lang:masterfrom
RalfJung:rollup-0idjig7

Conversation

@RalfJung

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

ltrattand 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 <post@ralfj.de>
Co-authored-by: Ralf Jung <post@ralfj.de>
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
fixesrust-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
Copy Markdown
MemberAuthor

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

@bors

bors commented Sep 26, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 644b592 has been approved by RalfJung

@rustbotrustbot added the rollup A PR which is a rollup label Sep 26, 2020
@borsbors 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

bors commented Sep 26, 2020

Copy link
Copy Markdown
Collaborator

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

@rust-log-analyzer

This comment has been minimized.

@RalfJung

Copy link
Copy Markdown
MemberAuthor

(PR CI failure is a network issue)

@bors

bors commented Sep 26, 2020

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@borsbors 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
Copy Markdown
MemberAuthor

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

@borsbors 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 deleted the rollup-0idjig7 branch September 26, 2020 10:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupS-waiting-on-borsStatus: 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.

12 participants

@RalfJung@bors@rust-log-analyzer@rustbot@ltratt@estebank@lcnr@est31@ecstatic-morse@GuillaumeGomez@LingMan@camelid