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 5 pull requests #70404

Merged
merged 31 commits into from
Mar 25, 2020
Merged

Rollup of 5 pull requests #70404

merged 31 commits into from
Mar 25, 2020

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

lcnr and others added 30 commits March 23, 2020 18:39
The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.

The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.
InterpCtx => InterpCx 
(rustc_mir::interpret::InterpCx)
use checked casts and arithmetic in Miri engine

This is unfortunately pretty annoying because we have to cast back and forth between `u64` and `usize` more often that should be necessary, and that cast is considered fallible.

For example, should [this](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/interpret/value/enum.ConstValue.html) really be `usize`?

Also, `LayoutDetails` uses `usize` for field indices, but in Miri we use `u64` to be able to also handle array indexing. Maybe methods like `mplace_field` should be suitably generalized to accept both `u64` and `usize`?

r? @oli-obk Cc @eddyb
…-code-e0710, r=Dylan-DPC

Add long error explanation for E0710

Add long explanation for the E0710 error code
Part of rust-lang#61137

r? @GuillaumeGomez
Implement Fuse with Option

The former `done` flag was roughly similar to an `Option` tag, but left
the possibity of misuse. By using a real `Option`, we can set `None`
when the iterator is exhausted, removing any way to call it again. We
also allow niche layout this way, so the `Fuse` may be smaller.

The `FusedIterator` specialization does want to ignore the possibility
of exhaustion though, so it uses `unsafe { intrinsics::unreachable() }`
to optimize that branch away. The entire `Fuse` implementation is now
isolated in its own module to contain that unsafety.

r? @scottmcm
fix incorrect type name in doc comments

Change : `InterpCtx` => `InterpCx`
(`rustc_mir::interpret::InterpCx`)
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 25, 2020

📌 Commit 9a9cb2d has been approved by Dylan-DPC

@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 Mar 25, 2020
@Dylan-DPC-zz Dylan-DPC-zz added the rollup A PR which is a rollup label Mar 25, 2020
@bors
Copy link
Contributor

bors commented Mar 25, 2020

⌛ Testing commit 9a9cb2d with merge 636a3b30f1bd524e009f7b40a320d6fddaff5092...

@bors
Copy link
Contributor

bors commented Mar 25, 2020

💔 Test failed - checks-azure

@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 Mar 25, 2020
@Dylan-DPC-zz
Copy link
Author

Looks spurious

@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 Mar 25, 2020
@bors
Copy link
Contributor

bors commented Mar 25, 2020

⌛ Testing commit 9a9cb2d with merge a5fb9ae...

@bors
Copy link
Contributor

bors commented Mar 25, 2020

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing a5fb9ae to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

8 participants