File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -409,9 +409,9 @@ Moreover, Miri recognizes some environment variables:
409
409
checkout. Note that changing files in that directory does not automatically
410
410
trigger a re-build of the standard library; you have to clear the Miri build
411
411
cache manually (on Linux, `rm -rf ~/.cache/miri`).
412
- * `MIRI_SYSROOT` (recognized by `cargo miri` and the Miri driver) indicates the
413
- sysroot to use. Only set this if you do not want to use the automatically
414
- created sysroot.
412
+ * `MIRI_SYSROOT` (recognized by `cargo miri` and the Miri driver) indicates the sysroot to use. When
413
+ using `cargo miri`, only set this if you do not want to use the automatically created sysroot. For
414
+ directly invoking the Miri driver, this variable (or a `-- sysroot` flag) is mandatory .
415
415
* `MIRI_TEST_TARGET` (recognized by the test suite and the `./miri` script) indicates which target
416
416
architecture to test against. `miri` and `cargo miri` accept the `--target` flag for the same
417
417
purpose.
Original file line number Diff line number Diff line change @@ -25,4 +25,16 @@ fn main() {
25
25
let a = autocfg:: new ( ) ;
26
26
assert ! ( a. probe_sysroot_crate( "std" ) ) ;
27
27
assert ! ( !a. probe_sysroot_crate( "doesnotexist" ) ) ;
28
+ assert ! ( a. probe_rustc_version( 1 , 0 ) ) ;
29
+ assert ! ( !a. probe_rustc_version( 2 , 0 ) ) ;
30
+ assert ! ( a. probe_type( "i128" ) ) ;
31
+ assert ! ( !a. probe_type( "doesnotexist" ) ) ;
32
+ assert ! ( a. probe_trait( "Send" ) ) ;
33
+ assert ! ( !a. probe_trait( "doesnotexist" ) ) ;
34
+ assert ! ( a. probe_path( "std::num" ) ) ;
35
+ assert ! ( !a. probe_path( "doesnotexist" ) ) ;
36
+ assert ! ( a. probe_constant( "i32::MAX" ) ) ;
37
+ assert ! ( !a. probe_constant( "doesnotexist" ) ) ;
38
+ assert ! ( a. probe_expression( "Box::new(0)" ) ) ;
39
+ assert ! ( !a. probe_expression( "doesnotexist" ) ) ;
28
40
}
You can’t perform that action at this time.
0 commit comments