Skip to content

Commit 02e09dc

Browse files
authored
Merge pull request rust-lang#337 from RalfJung/rustup
rustup
2 parents 237590a + ca0f063 commit 02e09dc

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ script:
1616
xargo/build.sh
1717
- |
1818
# Test plain miri
19-
cargo build --locked --release --features "cargo_miri" &&
20-
cargo test --release --all &&
21-
cargo install --features "cargo_miri"
19+
cargo build --locked --release --all-features &&
20+
cargo test --locked --release --all-features --all &&
21+
cargo install --locked --all-features
2222
- |
2323
# Test cargo miri
2424
cd cargo-miri-test &&
@@ -27,7 +27,7 @@ script:
2727
cd ..
2828
- |
2929
# and run all tests with full mir
30-
MIRI_SYSROOT=~/.xargo/HOST cargo test --release
30+
MIRI_SYSROOT=~/.xargo/HOST cargo test --locked --release
3131
- |
3232
# test that the rustc_tests binary compiles
3333
cd rustc_tests &&

miri/bin/miri.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate syntax;
1111
extern crate log;
1212

1313
use rustc::session::Session;
14+
use rustc::middle::cstore::CrateStore;
1415
use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls};
1516
use rustc_driver::driver::{CompileState, CompileController};
1617
use rustc::session::config::{self, Input, ErrorOutputType};
@@ -64,11 +65,12 @@ impl<'a> CompilerCalls<'a> for MiriCompilerCalls {
6465
&mut self,
6566
matches: &getopts::Matches,
6667
sess: &Session,
68+
cstore: &CrateStore,
6769
input: &Input,
6870
odir: &Option<PathBuf>,
6971
ofile: &Option<PathBuf>,
7072
) -> Compilation {
71-
self.default.late_callback(matches, sess, input, odir, ofile)
73+
self.default.late_callback(matches, sess, cstore, input, odir, ofile)
7274
}
7375
fn build_controller(
7476
&mut self,

rustc_tests/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use std::io;
1313

1414

1515
use rustc::session::Session;
16+
use rustc::middle::cstore::CrateStore;
1617
use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls};
1718
use rustc_driver::driver::{CompileState, CompileController};
1819
use rustc::session::config::{self, Input, ErrorOutputType};
@@ -52,11 +53,12 @@ impl<'a> CompilerCalls<'a> for MiriCompilerCalls {
5253
&mut self,
5354
matches: &getopts::Matches,
5455
sess: &Session,
56+
cstore: &CrateStore,
5557
input: &Input,
5658
odir: &Option<PathBuf>,
5759
ofile: &Option<PathBuf>
5860
) -> Compilation {
59-
self.default.late_callback(matches, sess, input, odir, ofile)
61+
self.default.late_callback(matches, sess, cstore, input, odir, ofile)
6062
}
6163
fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> CompileController<'a> {
6264
let mut control = self.default.build_controller(sess, matches);

src/librustc_mir/interpret/validation.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -398,23 +398,6 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
398398
}
399399
}
400400

401-
// HACK: For now, bail out if we hit a dead local during recovery (can happen because sometimes we have
402-
// StorageDead before EndRegion due to https://github.com/rust-lang/rust/issues/43481).
403-
// TODO: We should rather fix the MIR.
404-
match query.lval.1 {
405-
Lvalue::Local { frame, local } => {
406-
let res = self.stack[frame].get_local(local);
407-
match (res, mode) {
408-
(Err(EvalError { kind: EvalErrorKind::DeadLocal, .. }),
409-
ValidationMode::Recover(_)) => {
410-
return Ok(());
411-
}
412-
_ => {}
413-
}
414-
}
415-
_ => {}
416-
}
417-
418401
query.ty = self.normalize_type_unerased(&query.ty);
419402
trace!("{:?} on {:?}", mode, query);
420403

0 commit comments

Comments
 (0)