Skip to content

Commit c6e747e

Browse files
committed
Merge remote-tracking branch 'origin/master' into str-index-mut
2 parents e5972c3 + 39275ab commit c6e747e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+820
-339
lines changed
File renamed without changes.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ directories = { version = "1.0", optional = true }
3939
rustc_version = { version = "0.2.3", optional = true }
4040
env_logger = "0.6"
4141
log = "0.4"
42+
shell-escape = "0.1.4"
4243
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
4344
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
4445
# for more information.
@@ -55,3 +56,6 @@ rustc_tests = []
5556
[dev-dependencies]
5657
compiletest_rs = { version = "0.3.17", features = ["tmp"] }
5758
colored = "1.6"
59+
60+
[profile.release]
61+
debug = true

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,19 @@ Now you can run your project in Miri:
4848
3. If you have a binary project, you can run it through Miri using `cargo
4949
+nightly miri run`.
5050

51-
When running code via `cargo miri`, the `cargo-miri` feature is set. You can
51+
You can pass arguments to Miri after the first `--`, and pass arguments to the
52+
interpreted program or test suite after the second `--`. For example, `cargo
53+
+nightly miri run -- -Zmiri-disable-validation` runs the program without
54+
validation of basic type invariants and references. `cargo +nightly miri test
55+
-- -- filter` passes `filter` to the test suite the same way `cargo test filter`
56+
would.
57+
58+
When running code via `cargo miri`, the `miri` config flag is set. You can
5259
use this to exclude test cases that will fail under Miri because they do things
5360
Miri does not support:
5461

5562
```rust
56-
#[cfg(not(feature = "cargo-miri"))]
63+
#[cfg(not(miri))]
5764
#[test]
5865
fn does_not_work_on_miri() {
5966
let x = 0u8;

benches/helpers/miri_helper.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ extern crate rustc;
44
extern crate rustc_driver;
55
extern crate test;
66

7-
use self::miri::eval_main;
8-
use self::rustc_driver::{driver, Compilation};
7+
use rustc_driver::{driver, Compilation};
98
use rustc::hir::def_id::LOCAL_CRATE;
109
use std::cell::RefCell;
1110
use std::rc::Rc;
11+
12+
use miri::{MiriConfig, eval_main};
13+
1214
use crate::test::Bencher;
1315

1416
pub struct MiriCompilerCalls<'a>(Rc<RefCell<&'a mut Bencher>>);
@@ -50,7 +52,8 @@ pub fn run(filename: &str, bencher: &mut Bencher) {
5052
);
5153

5254
bencher.borrow_mut().iter(|| {
53-
eval_main(tcx, entry_def_id, false);
55+
let config = MiriConfig { validate: true, args: vec![] };
56+
eval_main(tcx, entry_def_id, config);
5457
});
5558

5659
state.session.abort_if_errors();

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2019-01-30
1+
nightly-2019-02-13

0 commit comments

Comments
 (0)