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

Reintroduce Undef and properly check constant value sizes #52712

Merged
merged 12 commits into from
Aug 3, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 25, 2018

r? @RalfJung

cc @eddyb

basically all kinds of silent failures that never occurred are assertions now

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:25:27] error: aborting due to 2 previous errors
[00:25:27] 
[00:25:27] For more information about this error, try `rustc --explain E0080`.
[00:25:27] 
[00:25:27] note: the compiler unexpectedly panicked. this is a bug.
[00:25:27] 
[00:25:27] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:25:27] note: rustc 1.29.0-dev running on x86_64-unknown-linux-gnu
[00:25:27] 
[00:25:27] 
[00:25:27] note: compiler flags: -Z force-unstable-if-unmarked -C prefer-dynamic -C opt-level=2 -C prefer-dynamic -C debug-assertions=y -C link-args=-Wl,-rpath,$ORIGIN/../lib --crate-type dylib
[00:25:27] 
[00:25:27] note: some of the compiler flags provided by cargo are hidden
[00:25:27] error: Could not compile `rustc`.
[00:25:27] 
[00:25:27] Caused by:
[00:25:27] Caused by:
[00:25:27]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc librustc/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=a9489390ece37231 -C extra-filename=-a9489390ece37231 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/lit/modules
149116 ./src/llvm-emscripten/test
145440 ./obj/build/bootstrap/debug/incremental
130572 ./obj/build/bootstrap/debug/incremental/bootstrap-2fbxwhl9tnp02
130572 ./obj/build/bootstrap/debug/incremental/bootstrap-2fbxwhl9tnp02
130568 ./obj/build/bootstrap/debug/incremental/bootstrap-2fbxwhl9tnp02/s-f38ovn7vgy-1ivc33o-2rpcqp3yi7261
97528 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
97464 ./obj/build/x86_64-unknown-linux-gnu/stage1-std
88260 ./obj/build/x86_64-unknown-linux-gnu/stage1
88236 ./obj/build/x86_64-unknown-linux-gnu/stage1/lib

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

[00:03:47] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:47] tidy error: /checkout/src/test/ui/const-eval/simple_with_undef.rs: missing trailing newline
[00:03:49] some tidy checks failed
[00:03:49] 
[00:03:49] 
[00:03:49] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:49] 
[00:03:49] 
[00:03:49] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:49] Build completed unsuccessfully in 0:00:46
[00:03:49] Build completed unsuccessfully in 0:00:46
[00:03:49] make: *** [tidy] Error 1
[00:03:49] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0aee2000
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:15c93dc5:start=1532607064951102863,finish=1532607064958647826,duration=7544963
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:088fc541
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:017ea64d
travis_time:start:017ea64d
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:2ad4f1b8
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:48:09] ....................................................................................................
[00:48:20] ..............................................................................................i.....
[00:48:29] ....................................................................................................
[00:48:42] ....................................................................................................
[00:48:52] ...................................................................F................................
[00:49:11] .........................................................................i..........................
[00:49:28] ....................................................................................................
[00:49:37] ....................................................................................................
[00:49:52] ...........................................ii.......................................................
---
travis_time:end:2b1ac707:start=1532612028373721577,finish=1532612028383965910,duration=10244333
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2a31f4a0
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

}
}

pub fn to_value_with_len<C: HasDataLayout>(self, len: u64, cx: C) -> Value {
ScalarMaybeUndef::Scalar(self).to_value_with_len(len, cx)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this, but not the vtable version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the vtable one wasn't used anywhere

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in terms of API consistency it still makes sense to have them both.

ScalarMaybeUndef::Scalar(scalar) => {
scalar.ptr_signed_offset(i, cx).map(ScalarMaybeUndef::Scalar)
},
ScalarMaybeUndef::Undef => Ok(ScalarMaybeUndef::Undef)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, no error here? Don't we otherwise insta-error on any operation in undef?

}

impl ScalarMaybeUndef {
pub fn read(self) -> EvalResult<'static, Scalar> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read sounds a bit like it might access memory. I don't have a great idea for a better name either, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's "accessing" the "memory" inside the Scalar. I changed it to unwrap_or_err

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

_ => bug!("invalid `{}` argument: {:?}", name, bits),
};
let extra = 128 - defined as u128;
let extra = 128 - size.bits() as u128;
let bits_out = match name {
"ctpop" => bits.count_ones() as u128,
"ctlz" => bits.leading_zeros() as u128 - extra,
"cttz" => (bits << extra).trailing_zeros() as u128 - extra,
"bswap" => (bits << extra).swap_bytes(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, so we have these duplicated between miri and CTFE? :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miri should just forward to ctfe for these

@@ -1233,7 +1248,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
}
}

pub fn read_value(&self, ptr: Scalar, align: Align, ty: Ty<'tcx>) -> EvalResult<'tcx, Value> {
pub fn read_value(&mut self, ptr: Scalar, align: Align, ty: Ty<'tcx>) -> EvalResult<'tcx, Value> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this become mut?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the sanity check branch hadn't been merged yet and discriminant reading still allocated here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this can go back to just & now?

ScalarMaybeUndef::Undef,
ScalarMaybeUndef::Undef,
),
_ => Value::ByRef(self.alloc_ptr(ty)?.into(), layout.align),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why allocate eagerly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try make it lazy again

self.mark_definedness(ptr, size, false)?;
Scalar::Bits { size: 0, .. } => {
// nothing to do for ZSTs
assert_eq!(type_size.bytes(), 0);
return Ok(());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early return is dangerous. Did we check everything we have to check, i.e., pointer alignment?

// compile-pass

const PARSE_BOOL: Option<&'static str> = None;
static FOO: (Option<&str>, u32) = (PARSE_BOOL, 42);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is there an undef here? The enum gets layout optimized so writing None initializes the entire thing, does it not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a regression when building stage 2 that didn't occur in the test suite, so I added a test. The issue was that some function didn't read the discriminant and figure out the variant layout before reading fields, so it was reading fields by enum indices (where 0 is the discriminant).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the test, I am just confused by the filename, which says that undef is relevant here.

@RalfJung
Copy link
Member

basically all kinds of silent failures that never occurred are assertions now

You mentioned you found some real bugs. Could they be reached by actual code, i.e., should we have testcases (probably in miri to avoid CTFE restrictions)? Are these places still subtle in the code and could warrant extra comments?

The patch looks good to me (except for the comments I added), but I also did not notice any actual behavioral changes.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 30, 2018

Could they be reached by actual code

I have not been able to do that.

Are these places still subtle in the code and could warrant extra comments?

Not anymore. We'll run into assertions now and generally the requirement for an Undef match arm should make it obvious now

I also did not notice any actual behavioral changes.

That's the idea. Silent unreachable conversions become assertions.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:49:19] ....................................................................................................
[00:49:29] ..................................................................................................i.
[00:49:39] ....................................................................................................
[00:49:52] ....................................................................................................
[00:50:03] ........................................................................F...........................
[00:50:25] .............................................................................i......................
[00:50:45] ....................................................................................................
[00:50:56] ....................................................................................................
[00:51:11] ...............................................ii...................................................
[00:51:11] ...............................................ii...................................................
[00:51:27] .........i....i.....................................................i...............................
[00:51:53] ....................................................................................................
[00:52:03] ....................................................................................................
[00:52:12] ....................................................................................................
[00:52:23] ....................................................................................................
ield 0 of Scalar(Scalar(Bits { size: 1, bits: 2 })) yielded ByRef(Ptr(Pointer { alloc_id: AllocId(513), offset: Size { raw: 0 } }), Align { abi_pow2: 0, pref_pow2: 3 })
[00:52:30] thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:578:9
[00:52:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:52:30] error: aborting due to previous error
[00:52:30] 
[00:52:30] 
[00:52:30] 
[00:52:30] note: the compiler unexpectedly panicked. this is a bug.
[00:52:30] 
[00:52:30] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:52:30] note: rustc 1.29.0-dev running on x86_64-unknown-linux-gnu
[00:52:30] 
[00:52:30] 
[00:52:30] note: compiler flags: -Z unstable-options -C prefer-dynamic -C rpath
[00:52:30] 
[00:52:30] ------------------------------------------
[00:52:30] 
[00:52:30] thread '[run-pass] run-pass/match-arm-statics.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3149:9
---
[00:52:30] 
[00:52:30] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:52:30] 
[00:52:30] 
[00:52:30] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "5.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:52:30] 
[00:52:30] 
[00:52:30] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:52:30] Build completed unsuccessfully in 0:08:43
[00:52:30] Build completed unsuccessfully in 0:08:43
[00:52:30] Makefile:58: recipe for target 'check' failed
[00:52:30] make: *** [check] Error 1
2449456 ./obj
2342708 ./obj/build
1748864 ./obj/build/x86_64-unknown-linux-gnu
786436 ./src
---
145452 ./obj/build/bootstrap/debug/incremental
133576 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu
133572 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release
130584 ./obj/build/bootstrap/debug/incremental/bootstrap-c7ee2tfsizs
130580 ./obj/build/bootstrap/debug/incremental/bootstrap-c7ee2tfsizs/s-f3g6fjg6qj-1ufkqpd-ef3q0uwki5t3
128816 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release
122500 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/re

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@oli-obk
Copy link
Contributor Author

oli-obk commented Aug 3, 2018

This is ready @RalfJung

let endianness = self.endianness();

let val = match val {
ScalarMaybeUndef::Scalar(scalar) => scalar,
ScalarMaybeUndef::Undef => return self.mark_definedness(ptr, type_size, false),
Copy link
Member

@RalfJung RalfJung Aug 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still early returns (also below). I had a comment about that in the first round already. Unfortunately GitHub is really bad at tracking review comments...

Previously this function always called self.check_align, now it does not seem to do that at all any more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the code below makes no sense without the scalar from the other match arm.

I reintroduced the check_align in the very beginning of the function. I'm not sure why we only checked alignment for non-zsts...

@@ -1554,7 +1545,7 @@ impl<'a, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M
let b_val = self.memory.read_scalar(b_ptr, ptr_align, b_size)?;
Ok(Some(Value::ScalarPair(a_val, b_val)))
}
_ => Ok(None),
_ => Ok(None),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spurious whitespace

@@ -60,12 +57,12 @@ impl<'tcx> ConstValue<'tcx> {

#[inline]
pub fn to_bits(&self, size: Size) -> Option<u128> {
self.to_scalar()?.to_bits(size).ok()
self.try_to_scalar()?.to_bits(size).ok()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ ? for Option

@RalfJung
Copy link
Member

RalfJung commented Aug 3, 2018

r=me with to_value_with_vtable added and when Travis is happy.

@oli-obk
Copy link
Contributor Author

oli-obk commented Aug 3, 2018

@bors r=RalfJung

@bors
Copy link
Contributor

bors commented Aug 3, 2018

📌 Commit 828aebf has been approved by RalfJung

@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 Aug 3, 2018
@bors
Copy link
Contributor

bors commented Aug 3, 2018

⌛ Testing commit 828aebf with merge ca7b6345191e8da156fe6989f29b6a03c32800ba...

@bors
Copy link
Contributor

bors commented Aug 3, 2018

💔 Test failed - status-travis

@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 Aug 3, 2018
@rust-highfive
Copy link
Collaborator

The job wasm32-unknown of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:37:04]    Compiling rustc_allocator v0.0.0 (file:///checkout/src/librustc_allocator)
[00:37:58] [RUSTC-TIMING] rustc_allocator test:false 53.825
[00:37:58] [RUSTC-TIMING] rustc_traits test:false 54.798

Broadcast message from root@travis-job-898b10d4-3b98-411f-b48b-3f8a85539890
 (unknown) at 12:21 ...
The system is going down for power off NOW!
[00:38:02] 
[00:38:02] Session terminated, terminating shell... ...terminated.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 143.
travis_time:start:0fe49f80
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@oli-obk
Copy link
Contributor Author

oli-obk commented Aug 3, 2018

The system is going down for power off NOW!

@bors retry lolwat?

@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 Aug 3, 2018
@bors
Copy link
Contributor

bors commented Aug 3, 2018

⌛ Testing commit 828aebf with merge 59fa6bd...

bors added a commit that referenced this pull request Aug 3, 2018
Reintroduce `Undef` and properly check constant value sizes

r? @RalfJung

cc @eddyb

basically all kinds of silent failures that never occurred are assertions now
@RalfJung
Copy link
Member

RalfJung commented Aug 3, 2018

lolwat?

Another instance of travis-ci/travis-ci#4924

@bors
Copy link
Contributor

bors commented Aug 3, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: RalfJung
Pushing 59fa6bd to master...

@bors bors merged commit 828aebf into rust-lang:master Aug 3, 2018
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #52712!

Tested on commit 59fa6bd.
Direct link to PR: #52712

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 miri on windows: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Aug 3, 2018
Tested on commit rust-lang/rust@59fa6bd.
Direct link to PR: <rust-lang/rust#52712>

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 miri on windows: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @RalfJung @eddyb, @rust-lang/infra).
💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).
@kennytm
Copy link
Member

kennytm commented Aug 3, 2018

RLS and clippy:

[01:02:33]    --> tools/clippy/clippy_lints/src/consts.rs:439:50
[01:02:33]     |
[01:02:33] 439 |         ConstValue::ScalarPair(Scalar::Ptr(ptr), Scalar::Bits { bits: n, .. }) => match result.ty.sty {
[01:02:33]     |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `rustc::mir::interpret::value::ScalarMaybeUndef`, found enum `rustc::mir::interpret::value::Scalar`
[01:02:33]     |
[01:02:33]     = note: expected type `rustc::mir::interpret::value::ScalarMaybeUndef`
[01:02:33]                found type `rustc::mir::interpret::value::Scalar`
Miri:
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]   --> tools/miri/src/lib.rs:80:33
[01:08:04]    |
[01:08:04] 80 |         Scalar::Bits { bits: 0, defined: 128 }
[01:08:04]    |                                 ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]   --> tools/miri/src/lib.rs:84:48
[01:08:04]    |
[01:08:04] 84 |         Scalar::Bits { bits: i as u32 as u128, defined: 32 }
[01:08:04]    |                                                ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]   --> tools/miri/src/lib.rs:88:33
[01:08:04]    |
[01:08:04] 88 |         Scalar::Bits { bits: i, defined: 128 }
[01:08:04]    |                                 ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]   --> tools/miri/src/lib.rs:92:41
[01:08:04]    |
[01:08:04] 92 |         Scalar::Bits { bits: i as u128, defined: 128 }
[01:08:04]    |                                         ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]   --> tools/miri/src/lib.rs:96:41
[01:08:04]    |
[01:08:04] 96 |         Scalar::Bits { bits: i as u128, defined: ptr_size.bits() as u8 }
[01:08:04]    |                                         ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]    --> tools/miri/src/lib.rs:100:49
[01:08:04]     |
[01:08:04] 100 |         Scalar::Bits { bits: i as i128 as u128, defined: ptr_size.bits() as u8 }
[01:08:04]     |                                                 ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]    --> tools/miri/src/lib.rs:104:51
[01:08:04]     |
[01:08:04] 104 |         Scalar::Bits { bits: f.to_bits() as u128, defined: 32 }
[01:08:04]     |                                                   ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:04]    --> tools/miri/src/lib.rs:108:51
[01:08:04]     |
[01:08:04] 108 |         Scalar::Bits { bits: f.to_bits() as u128, defined: 64 }
[01:08:04]     |                                                   ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0026]: variant `rustc::mir::interpret::Scalar::Bits` does not have a field named `defined`
[01:08:04]    --> tools/miri/src/lib.rs:119:34
[01:08:04]     |
[01:08:04] 119 |             Scalar::Bits { bits, defined } => {
[01:08:04]     |                                  ^^^^^^^ variant `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:04] error[E0027]: pattern does not mention field `size`
[01:08:04]    --> tools/miri/src/lib.rs:119:13
[01:08:04]     |
[01:08:04] 119 |             Scalar::Bits { bits, defined } => {
[01:08:04]     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field `size`
[01:08:04]
[01:08:04] error[E0026]: variant `rustc::mir::interpret::Scalar::Bits` does not have a field named `defined`
[01:08:04]    --> tools/miri/src/lib.rs:132:28
[01:08:04]     |
[01:08:04] 132 |             Scalar::Bits { defined: 0, .. } => err!(ReadUndefBytes),
[01:08:04]     |                            ^^^^^^^^^^ variant `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:04]
[01:08:05] error[E0308]: mismatched types
[01:08:05]    --> tools/miri/src/lib.rs:205:38
[01:08:05]     |
[01:08:05] 205 |                 value: Value::Scalar(Scalar::Ptr(main_ptr)),
[01:08:05]     |                                      ^^^^^^^^^^^^^^^^^^^^^
[01:08:05]     |                                      |
[01:08:05]     |                                      expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:05]     |                                      help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(Scalar::Ptr(main_ptr))`
[01:08:05]     |
[01:08:05]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:05]                found type `rustc::mir::interpret::Scalar`
[01:08:05]
[01:08:05] error[E0061]: this function takes 6 parameters but 5 parameters were supplied
[01:08:05]    --> tools/miri/src/lib.rs:224:20
[01:08:05]     |
[01:08:05] 224 |         ecx.memory.write_scalar(foo_ptr.into(), ptr_align, Scalar::Ptr(foo), ptr_size, false)?;
[01:08:05]     |                    ^^^^^^^^^^^^ expected 6 parameters
[01:08:05]
[01:08:05] error[E0308]: mismatched types
[01:08:05]    --> tools/miri/src/lib.rs:234:36
[01:08:05]     |
[01:08:05] 234 |             Place::from_scalar_ptr(Scalar::from_u128(1), ty::layout::Align::from_bytes(1, 1).unwrap()),
[01:08:05]     |                                    ^^^^^^^^^^^^^^^^^^^^
[01:08:05]     |                                    |
[01:08:05]     |                                    expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:05]     |                                    help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::from_u128(1))`
[01:08:05]     |
[01:08:05]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:05]                found type `rustc::mir::interpret::Scalar`
[01:08:05]
[01:08:05] error[E0308]: mismatched types
[01:08:05]    --> tools/miri/src/lib.rs:300:28
[01:08:05]     |
[01:08:05] 300 |                     if let Some(local) = local {
[01:08:05]     |                            ^^^^^^^^^^^ expected enum `rustc_mir::interpret::eval_context::LocalValue`, found enum `std::option::Option`
[01:08:05]     |
[01:08:05]     = note: expected type `rustc_mir::interpret::eval_context::LocalValue`
[01:08:05]                found type `std::option::Option<_>`
[01:08:05]
[01:08:05] error[E0308]: mismatched types
[01:08:05]    --> tools/miri/src/lib.rs:530:38
[01:08:05]     |
[01:08:05] 530 |                   value: Value::Scalar(Scalar::from_u128(match layout.size.bytes() {
[01:08:05]     |  ______________________________________^
[01:08:05] 531 | |                     0 => 1 as u128,
[01:08:05] 532 | |                     size => size as u128,
[01:08:05] 533 | |                 })),
[01:08:05]     | |__________________^ expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:05]     |
[01:08:05]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:05]                found type `rustc::mir::interpret::Scalar`
[01:08:05] help: try using a variant of the expected type
[01:08:05]     |
[01:08:05] 530 |                 value: Value::Scalar(rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::from_u128(match layout.size.bytes() {
[01:08:05] 531 |                         0 => 1 as u128,
[01:08:05] 532 |                         size => size as u128,
[01:08:05] 533 |                     }))),
[01:08:05]     |
[01:08:05]
[01:08:05] error[E0308]: mismatched types
[01:08:05]    --> tools/miri/src/lib.rs:543:38
[01:08:05]     |
[01:08:05] 543 |                 value: Value::Scalar(Scalar::from_u128(layout.align.abi().into())),
[01:08:05]     |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:08:05]     |                                      |
[01:08:05]     |                                      expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:05]     |                                      help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::from_u128(layout.align.abi().into()))`
[01:08:05]     |
[01:08:05]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:05]                found type `rustc::mir::interpret::Scalar`
[01:08:05]
[01:08:05] error[E0599]: no method named `is_null` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:05]    --> tools/miri/src/fn_call.rs:205:25
[01:08:05]     |
[01:08:05] 205 |                 if !ptr.is_null()? {
[01:08:05]     |                         ^^^^^^^
[01:08:05]     |
[01:08:05]     = help: items from traits can only be used if the trait is implemented and in scope
[01:08:05]     = note: the following trait defines an item `is_null`, perhaps you need to implement it:
[01:08:05]             candidate #1: `ScalarExt`
[01:08:05]
[01:08:05] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:05]    --> tools/miri/src/fn_call.rs:207:29
[01:08:05]     |
[01:08:05] 207 |                         ptr.to_ptr()?,
[01:08:05]     |                             ^^^^^^
[01:08:05]
[01:08:05] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:05]    --> tools/miri/src/fn_call.rs:244:57
[01:08:05]     |
[01:08:05] 244 |                 let ptr = self.into_ptr(args[0].value)?.to_ptr()?;
[01:08:05]     |                                                         ^^^^^^
[01:08:05]
[01:08:05] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:05]    --> tools/miri/src/fn_call.rs:260:57
[01:08:05]     |
[01:08:05] 260 |                 let ptr = self.into_ptr(args[0].value)?.to_ptr()?;
[01:08:05]     |                                                         ^^^^^^
[01:08:05]
[01:08:05] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:05]    --> tools/miri/src/fn_call.rs:303:60
[01:08:05]     |
[01:08:05] 303 |                 let symbol = self.into_ptr(args[1].value)?.to_ptr()?;
[01:08:05]     |                                                            ^^^^^^
[01:08:05]
[01:08:05] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:05]    --> tools/miri/src/fn_call.rs:317:55
[01:08:05]     |
[01:08:05] 317 |                 let f = self.into_ptr(args[0].value)?.to_ptr()?;
[01:08:05]     |                                                       ^^^^^^
[01:08:05]
[01:08:05] error[E0308]: mismatched types
[01:08:05]    --> tools/miri/src/fn_call.rs:341:42
[01:08:05]     |
[01:08:05] 341 |                 self.write_ptr(arg_dest, data, u8_ptr_ty)?;
[01:08:05]     |                                          ^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:05]     |
[01:08:05]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:05]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:05]
[01:08:06] error[E0308]: mismatched types
[01:08:06]    --> tools/miri/src/fn_call.rs:362:61
[01:08:06]     |
[01:08:06] 362 |                     let left_bytes = self.memory.read_bytes(left, n)?;
[01:08:06]     |                                                             ^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]     |
[01:08:06]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:06]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]
[01:08:06] error[E0308]: mismatched types
[01:08:06]    --> tools/miri/src/fn_call.rs:363:62
[01:08:06]     |
[01:08:06] 363 |                     let right_bytes = self.memory.read_bytes(right, n)?;
[01:08:06]     |                                                              ^^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]     |
[01:08:06]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:06]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]
[01:08:06] error[E0308]: mismatched types
[01:08:06]    --> tools/miri/src/fn_call.rs:384:59
[01:08:06]     |
[01:08:06] 384 |                 if let Some(idx) = self.memory.read_bytes(ptr, Size::from_bytes(num))?.iter().rev().position(
[01:08:06]     |                                                           ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]     |
[01:08:06]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:06]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]
[01:08:06] error[E0308]: mismatched types
[01:08:06]    --> tools/miri/src/fn_call.rs:389:42
[01:08:06]     |
[01:08:06] 389 |                     self.write_ptr(dest, new_ptr, dest_ty)?;
[01:08:06]     |                                          ^^^^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]     |
[01:08:06]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:06]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]
[01:08:06] error[E0308]: mismatched types
[01:08:06]    --> tools/miri/src/fn_call.rs:399:59
[01:08:06]     |
[01:08:06] 399 |                 if let Some(idx) = self.memory.read_bytes(ptr, Size::from_bytes(num))?.iter().position(
[01:08:06]     |                                                           ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]     |
[01:08:06]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:06]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]
[01:08:06] error[E0308]: mismatched types
[01:08:06]    --> tools/miri/src/fn_call.rs:404:42
[01:08:06]     |
[01:08:06] 404 |                     self.write_ptr(dest, new_ptr, dest_ty)?;
[01:08:06]     |                                          ^^^^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]     |
[01:08:06]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:06]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:06]
[01:08:06] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:06]    --> tools/miri/src/fn_call.rs:412:66
[01:08:06]     |
[01:08:06] 412 |                     let name_ptr = self.into_ptr(args[0].value)?.to_ptr()?;
[01:08:06]     |                                                                  ^^^^^^
[01:08:06]
[01:08:06] error[E0599]: no method named `is_null` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:06]    --> tools/miri/src/fn_call.rs:426:34
[01:08:06]     |
[01:08:06] 426 |                     if !name_ptr.is_null()? {
[01:08:06]     |                                  ^^^^^^^
[01:08:06]     |
[01:08:06]     = help: items from traits can only be used if the trait is implemented and in scope
[01:08:06]     = note: the following trait defines an item `is_null`, perhaps you need to implement it:
[01:08:06]             candidate #1: `ScalarExt`
[01:08:06]
[01:08:06] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:06]    --> tools/miri/src/fn_call.rs:427:68
[01:08:06]     |
[01:08:06] 427 |                         let name = self.memory.read_c_str(name_ptr.to_ptr()?)?;
[01:08:06]     |                                                                    ^^^^^^
[01:08:06]
[01:08:06] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:06]    --> tools/miri/src/fn_call.rs:447:67
[01:08:06]     |
[01:08:06] 447 |                     let value_ptr = self.into_ptr(args[1].value)?.to_ptr()?;
[01:08:06]     |                                                                   ^^^^^^
[01:08:06]
[01:08:06] error[E0599]: no method named `is_null` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:06]    --> tools/miri/src/fn_call.rs:449:34
[01:08:06]     |
[01:08:06] 449 |                     if !name_ptr.is_null()? {
[01:08:06]     |                                  ^^^^^^^
[01:08:06]     |
[01:08:06]     = help: items from traits can only be used if the trait is implemented and in scope
[01:08:06]     = note: the following trait defines an item `is_null`, perhaps you need to implement it:
[01:08:06]             candidate #1: `ScalarExt`
[01:08:06]
[01:08:06] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:06]    --> tools/miri/src/fn_call.rs:450:68
[01:08:06]     |
[01:08:06] 450 |                         let name = self.memory.read_c_str(name_ptr.to_ptr()?)?;
[01:08:06]     |                                                                    ^^^^^^
[01:08:06]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:488:59
[01:08:07]     |
[01:08:07] 488 |                     let buf_cont = self.memory.read_bytes(buf, Size::from_bytes(n))?;
[01:08:07]     |                                                           ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:07]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]
[01:08:07] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:07]    --> tools/miri/src/fn_call.rs:511:57
[01:08:07]     |
[01:08:07] 511 |                 let ptr = self.into_ptr(args[0].value)?.to_ptr()?;
[01:08:07]     |                                                         ^^^^^^
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:562:21
[01:08:07]     |
[01:08:07] 562 |                     Scalar::Ptr(dtor_ptr) => Some(self.memory.get_fn(dtor_ptr)?),
[01:08:07]     |                     ^^^^^^^^^^^^^^^^^^^^^ expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]                found type `rustc::mir::interpret::Scalar`
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:563:21
[01:08:07]     |
[01:08:07] 563 |                     Scalar::Bits { defined: 0, .. } => return err!(ReadUndefBytes),
[01:08:07]     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]                found type `rustc::mir::interpret::Scalar`
[01:08:07]
[01:08:07] error[E0026]: variant `rustc::mir::interpret::Scalar::Bits` does not have a field named `defined`
[01:08:07]    --> tools/miri/src/fn_call.rs:563:36
[01:08:07]     |
[01:08:07] 563 |                     Scalar::Bits { defined: 0, .. } => return err!(ReadUndefBytes),
[01:08:07]     |                                    ^^^^^^^^^^ variant `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:564:21
[01:08:07]     |
[01:08:07] 564 |                     Scalar::Bits { bits: 0, .. } => None,
[01:08:07]     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]                found type `rustc::mir::interpret::Scalar`
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:565:21
[01:08:07]     |
[01:08:07] 565 |                     Scalar::Bits { .. } => return err!(ReadBytesAsPointer),
[01:08:07]     |                     ^^^^^^^^^^^^^^^^^^^ expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]                found type `rustc::mir::interpret::Scalar`
[01:08:07]
[01:08:07] error[E0061]: this function takes 6 parameters but 5 parameters were supplied
[01:08:07]    --> tools/miri/src/fn_call.rs:578:29
[01:08:07]     |
[01:08:07] 578 |                 self.memory.write_scalar(
[01:08:07]     |                             ^^^^^^^^^^^^ expected 6 parameters
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:603:44
[01:08:07]     |
[01:08:07] 603 |                 self.memory.store_tls(key, new_ptr)?;
[01:08:07]     |                                            ^^^^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:07]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:622:38
[01:08:07]     |
[01:08:07] 622 |                 self.write_ptr(dest, addr, dest_ty)?;
[01:08:07]     |                                      ^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:07]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]    --> tools/miri/src/fn_call.rs:668:44
[01:08:07]     |
[01:08:07] 668 |                 self.memory.store_tls(key, new_ptr)?;
[01:08:07]     |                                            ^^^^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]     |
[01:08:07]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:07]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]
[01:08:07] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:07]    --> tools/miri/src/operator.rs:119:83
[01:08:07]     |
[01:08:07] 119 |                                 Scalar::Bits { bits: left.offset.bytes() as u128, defined: self.memory.pointer_size().bits() as u8 },
[01:08:07]     |                                                                                   ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:07]
[01:08:07] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:07]    --> tools/miri/src/operator.rs:121:84
[01:08:07]     |
[01:08:07] 121 |                                 Scalar::Bits { bits: right.offset.bytes() as u128, defined: self.memory.pointer_size().bits() as u8 },
[01:08:07]     |                                                                                    ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:07]
[01:08:07] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:07]    --> tools/miri/src/operator.rs:190:82
[01:08:07]     |
[01:08:07] 190 |                     (Scalar::Bits { bits: (left.offset.bytes() & right) as u128, defined: 128 }, false)
[01:08:07]     |                                                                                  ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]   --> tools/miri/src/intrinsic.rs:69:63
[01:08:07]    |
[01:08:07] 69 |                 let result_ptr = self.wrapping_pointer_offset(ptr, substs.type_at(0), offset)?;
[01:08:07]    |                                                               ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]    |
[01:08:07]    = note: expected type `rustc::mir::interpret::Scalar`
[01:08:07]               found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]
[01:08:07] error[E0308]: mismatched types
[01:08:07]   --> tools/miri/src/intrinsic.rs:88:41
[01:08:07]    |
[01:08:07] 88 |                     value: Value::ByRef(ptr, align),
[01:08:07]    |                                         ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]    |
[01:08:07]    = note: expected type `rustc::mir::interpret::Scalar`
[01:08:07]               found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:07]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:101:56
[01:08:08]     |
[01:08:08] 101 |                 self.write_value_to_ptr(args[1].value, dest, align, ty)?;
[01:08:08]     |                                                        ^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:08]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:113:43
[01:08:08]     |
[01:08:08] 113 |                 let old = self.read_value(ptr, align, ty)?;
[01:08:08]     |                                           ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:08]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:133:43
[01:08:08]     |
[01:08:08] 133 |                 let old = self.read_value(ptr, align, ty)?;
[01:08:08]     |                                           ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:08]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:139:63
[01:08:08]     |
[01:08:08] 139 |                 let (val, _) = self.binary_op(mir::BinOp::Eq, old, ty, expect_old, ty)?;
[01:08:08]     |                                                               ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:08]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:141:51
[01:08:08]     |
[01:08:08] 141 |                     value: Value::ScalarPair(old, val),
[01:08:08]     |                                                   ^^^
[01:08:08]     |                                                   |
[01:08:08]     |                                                   expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:08]     |                                                   help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(val)`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]                found type `rustc::mir::interpret::Scalar`
[01:08:08]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:181:43
[01:08:08]     |
[01:08:08] 181 |                 let old = self.read_value(ptr, align, ty)?;
[01:08:08]     |                                           ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:08]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]
[01:08:08] error[E0308]: mismatched types
[01:08:08]    --> tools/miri/src/intrinsic.rs:199:51
[01:08:08]     |
[01:08:08] 199 |                 let (val, _) = self.binary_op(op, old, ty, change, ty)?;
[01:08:08]     |                                                   ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]     |
[01:08:08]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:08]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:08]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:218:25
[01:08:09]     |
[01:08:09] 218 |                         src,
[01:08:09]     |                         ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:09]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:220:25
[01:08:09]     |
[01:08:09] 220 |                         dest,
[01:08:09]     |                         ^^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:09]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:342:39
[01:08:09]     |
[01:08:09] 342 |                         Value::Scalar(Scalar::Bits { defined: 0, .. }) => {
[01:08:09]     |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]                found type `rustc::mir::interpret::Scalar`
[01:08:09]
[01:08:09] error[E0026]: variant `rustc::mir::interpret::Scalar::Bits` does not have a field named `defined`
[01:08:09]    --> tools/miri/src/intrinsic.rs:342:54
[01:08:09]     |
[01:08:09] 342 |                         Value::Scalar(Scalar::Bits { defined: 0, .. }) => {
[01:08:09]     |                                                      ^^^^^^^^^^ variant `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:09]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:344:77
[01:08:09]     |
[01:08:09] 344 |                                 ty::layout::Abi::Scalar(_) => Value::Scalar(Scalar::null()),
[01:08:09]     |                                                                             ^^^^^^^^^^^^^^
[01:08:09]     |                                                                             |
[01:08:09]     |                                                                             expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:09]     |                                                                             help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::null())`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]                found type `rustc::mir::interpret::Scalar`
[01:08:09]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:354:59
[01:08:09]     |
[01:08:09] 354 |                         Value::Scalar(_) => Value::Scalar(Scalar::null()),
[01:08:09]     |                                                           ^^^^^^^^^^^^^^
[01:08:09]     |                                                           |
[01:08:09]     |                                                           expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:09]     |                                                           help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::null())`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]                found type `rustc::mir::interpret::Scalar`
[01:08:09]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:356:47
[01:08:09]     |
[01:08:09] 356 |                             Value::ScalarPair(Scalar::null(), Scalar::null())
[01:08:09]     |                                               ^^^^^^^^^^^^^^
[01:08:09]     |                                               |
[01:08:09]     |                                               expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:09]     |                                               help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::null())`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]                found type `rustc::mir::interpret::Scalar`
[01:08:09]
[01:08:09] error[E0308]: mismatched types
[01:08:09]    --> tools/miri/src/intrinsic.rs:356:63
[01:08:09]     |
[01:08:09] 356 |                             Value::ScalarPair(Scalar::null(), Scalar::null())
[01:08:09]     |                                                               ^^^^^^^^^^^^^^
[01:08:09]     |                                                               |
[01:08:09]     |                                                               expected enum `rustc::mir::interpret::ScalarMaybeUndef`, found enum `rustc::mir::interpret::Scalar`
[01:08:09]     |                                                               help: try using a variant of the expected type: `rustc::mir::interpret::ScalarMaybeUndef::Scalar(<Scalar>::null())`
[01:08:09]     |
[01:08:09]     = note: expected type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:09]                found type `rustc::mir::interpret::Scalar`
[01:08:09]
[01:08:09] error[E0599]: no method named `modify_local` found for type `&mut rustc_mir::interpret::EvalContext<'a, 'mir, 'tcx, Evaluator<'tcx>>` in the current scope
[01:08:09]    --> tools/miri/src/intrinsic.rs:362:59
[01:08:09]     |
[01:08:09] 362 |                     Place::Local { frame, local } => self.modify_local(frame, local, init)?,
[01:08:09]     |                                                           ^^^^^^^^^^^^
[01:08:09]
[01:08:10] error[E0308]: mismatched types
[01:08:10]    --> tools/miri/src/intrinsic.rs:367:51
[01:08:10]     |
[01:08:10] 367 |                     } => self.memory.write_repeat(ptr, 0, size)?,
[01:08:10]     |                                                   ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]     |
[01:08:10]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:10]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]
[01:08:10] error[E0308]: mismatched types
[01:08:10]    --> tools/miri/src/intrinsic.rs:393:56
[01:08:10]     |
[01:08:10] 393 |                 self.write_value_to_ptr(args[1].value, ptr, align, ty)?;
[01:08:10]     |                                                        ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]     |
[01:08:10]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:10]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]
[01:08:10] error[E0308]: mismatched types
[01:08:10]    --> tools/miri/src/intrinsic.rs:410:54
[01:08:10]     |
[01:08:10] 410 |                 let result_ptr = self.pointer_offset(ptr, substs.type_at(0), offset)?;
[01:08:10]     |                                                      ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]     |
[01:08:10]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:10]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]
[01:08:10] error[E0559]: variant `rustc::mir::interpret::Scalar::Bits` has no field named `defined`
[01:08:10]    --> tools/miri/src/intrinsic.rs:554:73
[01:08:10]     |
[01:08:10] 554 |                 self.write_scalar(dest, Scalar::Bits { bits: n as u128, defined: 64 }, dest_layout.ty)?;
[01:08:10]     |                                                                         ^^^^^^^ `rustc::mir::interpret::Scalar::Bits` does not have this field
[01:08:10]
[01:08:10] error[E0599]: no variant named `undef` found for type `rustc::mir::interpret::Scalar` in the current scope
[01:08:10]    --> tools/miri/src/intrinsic.rs:638:43
[01:08:10]     |
[01:08:10] 638 |                     _ => Ok(Value::Scalar(Scalar::undef())),
[01:08:10]     |                                           ^^^^^^^^^^^^^ variant not found in `rustc::mir::interpret::Scalar`
[01:08:10]
[01:08:10] error[E0599]: no method named `modify_local` found for type `&mut rustc_mir::interpret::EvalContext<'a, 'mir, 'tcx, Evaluator<'tcx>>` in the current scope
[01:08:10]    --> tools/miri/src/intrinsic.rs:641:59
[01:08:10]     |
[01:08:10] 641 |                     Place::Local { frame, local } => self.modify_local(frame, local, uninit)?,
[01:08:10]     |                                                           ^^^^^^^^^^^^
[01:08:10]
[01:08:10] error[E0308]: mismatched types
[01:08:10]    --> tools/miri/src/intrinsic.rs:646:55
[01:08:10]     |
[01:08:10] 646 |                     } => self.memory.mark_definedness(ptr, size, false)?,
[01:08:10]     |                                                       ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]     |
[01:08:10]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:10]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]
[01:08:10] error[E0308]: mismatched types
[01:08:10]    --> tools/miri/src/intrinsic.rs:662:45
[01:08:10]     |
[01:08:10] 662 |                     self.memory.check_align(ptr, ty_layout.align)?;
[01:08:10]     |                                             ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]     |
[01:08:10]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:10]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]
[01:08:10] error[E0308]: mismatched types
[01:08:10]    --> tools/miri/src/intrinsic.rs:663:46
[01:08:10]     |
[01:08:10] 663 |                     self.memory.write_repeat(ptr, val_byte, ty_layout.size * count)?;
[01:08:10]     |                                              ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]     |
[01:08:10]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:10]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:10]
[01:08:11] error[E0308]: mismatched types
[01:08:11]   --> tools/miri/src/helpers.rs:54:9
[01:08:11]    |
[01:08:11] 50 |     ) -> EvalResult<'tcx, Scalar> {
[01:08:11]    |          ------------------------ expected `std::result::Result<rustc::mir::interpret::Scalar, rustc::mir::interpret::EvalError<'tcx>>` because of return type
[01:08:11] ...
[01:08:11] 54 |         ptr.ptr_wrapping_signed_offset(offset, self)
[01:08:11]    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found enum `rustc::mir::interpret::Scalar`
[01:08:11]    |
[01:08:11]    = note: expected type `std::result::Result<rustc::mir::interpret::Scalar, rustc::mir::interpret::EvalError<'tcx>>`
[01:08:11]               found type `rustc::mir::interpret::Scalar`
[01:08:11]
[01:08:11] error[E0061]: this function takes 2 parameters but 3 parameters were supplied
[01:08:11]   --> tools/miri/src/helpers.rs:99:19
[01:08:11]    |
[01:08:11] 99 |         let raw = sign_extend(self.tcx.tcx, raw, self.tcx.types.isize)?;
[01:08:11]    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters
[01:08:11]
[01:08:11] error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
[01:08:11]   --> tools/miri/src/helpers.rs:99:19
[01:08:11]    |
[01:08:11] 99 |         let raw = sign_extend(self.tcx.tcx, raw, self.tcx.types.isize)?;
[01:08:11]    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `u128`
[01:08:11]    |
[01:08:11]    = help: the trait `std::ops::Try` is not implemented for `u128`
[01:08:11]    = note: required by `std::ops::Try::into_result`
[01:08:11]
[01:08:11] error[E0061]: this function takes 2 parameters but 3 parameters were supplied
[01:08:11]    --> tools/miri/src/helpers.rs:117:19
[01:08:11]     |
[01:08:11] 117 |         let raw = sign_extend(self.tcx.tcx, raw, self.tcx.types.i32)?;
[01:08:11]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters
[01:08:11]
[01:08:11] error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
[01:08:11]    --> tools/miri/src/helpers.rs:117:19
[01:08:11]     |
[01:08:11] 117 |         let raw = sign_extend(self.tcx.tcx, raw, self.tcx.types.i32)?;
[01:08:11]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `u128`
[01:08:11]     |
[01:08:11]     = help: the trait `std::ops::Try` is not implemented for `u128`
[01:08:11]     = note: required by `std::ops::Try::into_result`
[01:08:11]
[01:08:11] error[E0599]: no method named `get_local` found for type `&rustc_mir::interpret::Frame<'_, '_>` in the current scope
[01:08:11]    --> tools/miri/src/validation.rs:120:42
[01:08:11]     |
[01:08:11] 120 |                 let value = self.frame().get_local(v)?;
[01:08:11]     |                                          ^^^^^^^^^
[01:08:11]
[01:08:11] error[E0308]: mismatched types
[01:08:11]    --> tools/miri/src/validation.rs:512:33
[01:08:11]     |
[01:08:11] 512 |         self.memory.check_align(ptr, align)?;
[01:08:11]     |                                 ^^^ expected enum `rustc::mir::interpret::Scalar`, found enum `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:11]     |
[01:08:11]     = note: expected type `rustc::mir::interpret::Scalar`
[01:08:11]                found type `rustc::mir::interpret::ScalarMaybeUndef`
[01:08:11]
[01:08:11] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:11]    --> tools/miri/src/validation.rs:593:31
[01:08:11]     |
[01:08:11] 593 |                 let ptr = ptr.to_ptr()?;
[01:08:11]     |                               ^^^^^^
[01:08:11]
[01:08:11] error[E0599]: no method named `to_ptr` found for type `rustc::mir::interpret::ScalarMaybeUndef` in the current scope
[01:08:11]    --> tools/miri/src/validation.rs:682:51
[01:08:11]     |
[01:08:11] 682 |                     let ptr = self.into_ptr(ptr)?.to_ptr()?;
[01:08:11]     |                                                   ^^^^^^
[01:08:11]
[01:08:11] error: aborting due to 86 previous errors

@oli-obk oli-obk deleted the const_eval_cleanups branch August 3, 2018 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants