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

Remove unchecked_shr/shl from intrinsics #451

Merged
merged 4 commits into from
Sep 15, 2018
Merged

Remove unchecked_shr/shl from intrinsics #451

merged 4 commits into from
Sep 15, 2018

Conversation

TimDiekmann
Copy link
Member

r? @RalfJung

This PR adds a check in the intrinsics itself. It's not needed anymore.

@RalfJung
Copy link
Member

RalfJung commented Sep 6, 2018

rust-lang/rust#53697 also implemented some other intrinsics, could you remove those as well?

@TimDiekmann
Copy link
Member Author

Do I assume correctly when rust-lang/rust#53991 was merged and landed on the latest nightly, the tests will pass?

@RalfJung
Copy link
Member

RalfJung commented Sep 6, 2018

Thanks!

Do I assume correctly when rust-lang/rust#53991 was merged and landed on the latest nightly, the tests will pass?

Basically, yes -- except you will also have to update the rust-toolchain file in this repo to specify said nightly.

@TimDiekmann
Copy link
Member Author

TimDiekmann commented Sep 6, 2018 via email

@TimDiekmann
Copy link
Member Author

rust-lang/rust#53991 was merged, however with nightly-2018-09-08 it fails to compile:

error[E0277]: the trait bound `for<'a> MemoryData<'_>: rustc_data_structures::stable_hasher::HashStable<rustc::ich::StableHashingContext<'a>>` is not satisfied
   --> src/lib.rs:281:18
    |
281 | impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
    |                  ^^^^^^^^^^^^^^^^^^^ the trait `for<'a> rustc_data_structures::stable_hasher::HashStable<rustc::ich::StableHashingContext<'a>>` is not implemented for `MemoryData<'_>`

@RalfJung
Copy link
Member

RalfJung commented Sep 9, 2018

Ah, that looks like a fall-out from rust-lang/rust#52626... however, memory is not being hashed any more, so we should likely remove the trait bounds at https://github.com/rust-lang/rust/blob/dac76020a5a33fa723d578043e422455e598620b/src/librustc_mir/interpret/machine.rs#L30 and https://github.com/rust-lang/rust/blob/dac76020a5a33fa723d578043e422455e598620b/src/librustc_mir/interpret/machine.rs#L33.

But that still leaves the bound on the Machine itself. miri will need to do something like https://github.com/rust-lang/rust/blob/dac76020a5a33fa723d578043e422455e598620b/src/librustc_mir/interpret/eval_context.rs#L186. Do you want to give that a try? Otherwise I'll do it in a week or so, when I am back from my vacation.

@RalfJung
Copy link
Member

RalfJung commented Sep 9, 2018

Actually never mind -- miri shouldn't have any Hash or StableHash implementation. So once rust-lang/rust#54076 lands, you should be good.

@RalfJung
Copy link
Member

RalfJung commented Sep 9, 2018

I pushed a commit to this PR that makes miri compile again once rust-lang/rust#54076 lands.

@RalfJung RalfJung merged commit d198400 into rust-lang:master Sep 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants