Skip to content

Commit 66fdcd2

Browse files
committed
Auto merge of #2996 - rust-lang:rustup-2023-07-30, r=oli-obk
Automatic sync from rustc
2 parents 300b3d2 + 919c481 commit 66fdcd2

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ Moreover, Miri recognizes some environment variables:
482482
purpose.
483483
* `MIRI_NO_STD` (recognized by `cargo miri` and the test suite) makes sure that the target's
484484
sysroot is built without libstd. This allows testing and running no_std programs.
485-
* `MIRI_BLESS` (recognized by the test suite and `cargo-miri-test/run-test.py`): overwrite all
485+
* `RUSTC_BLESS` (recognized by the test suite and `cargo-miri-test/run-test.py`): overwrite all
486486
`stderr` and `stdout` files instead of checking whether the output matches.
487487
* `MIRI_SKIP_UI_CHECKS` (recognized by the test suite): don't check whether the
488488
`stderr` or `stdout` files match the actual output.

miri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ test|bless)
303303
$CARGO build $CARGO_EXTRA_FLAGS --manifest-path "$MIRIDIR"/Cargo.toml
304304
find_sysroot
305305
if [ "$COMMAND" = "bless" ]; then
306-
export MIRI_BLESS="Gesundheit"
306+
export RUSTC_BLESS="Gesundheit"
307307
fi
308308
# Then test, and let caller control flags.
309309
# Only in root project as `cargo-miri` has no tests.

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d150dbb067e66f351a0b33a54e7d4b464ef51e47
1+
fb53384c94b87adebceb6048865c9fe305e71b92

test-cargo-miri/run-test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import difflib
99
import os
1010
import re
11-
import sys
1211
import subprocess
12+
import sys
1313

1414
CGREEN = '\33[32m'
1515
CBOLD = '\33[1m'
@@ -37,7 +37,8 @@ def normalize_stderr(str):
3737
return str
3838

3939
def check_output(actual, path, name):
40-
if 'MIRI_BLESS' in os.environ:
40+
if os.environ.get("RUSTC_BLESS", "0") != "0":
41+
# Write the output only if bless is set
4142
open(path, mode='w').write(actual)
4243
return True
4344
expected = open(path).read()

tests/compiletest.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ fn test_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
7272
program.args.push(flag);
7373
}
7474

75+
let bless = env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0");
7576
let skip_ui_checks = env::var_os("MIRI_SKIP_UI_CHECKS").is_some();
7677

77-
let output_conflict_handling = match (env::var_os("MIRI_BLESS").is_some(), skip_ui_checks) {
78+
let output_conflict_handling = match (bless, skip_ui_checks) {
7879
(false, false) => OutputConflictHandling::Error("./miri bless".into()),
7980
(true, false) => OutputConflictHandling::Bless,
8081
(false, true) => OutputConflictHandling::Ignore,
81-
(true, true) => panic!("cannot use MIRI_BLESS and MIRI_SKIP_UI_CHECKS at the same time"),
82+
(true, true) => panic!("cannot use RUSTC_BLESS and MIRI_SKIP_UI_CHECKS at the same time"),
8283
};
8384

8485
let mut config = Config {

tests/fail/both_borrows/shr_frozen_violation1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33

4-
#![allow(cast_ref_to_mut)]
4+
#![allow(invalid_reference_casting)]
55

66
fn foo(x: &mut i32) -> i32 {
77
*x = 5;

tests/fail/modifying_constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This should fail even without validation/SB
22
//@compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
33

4-
#![allow(cast_ref_to_mut)]
4+
#![allow(invalid_reference_casting)]
55

66
fn main() {
77
let x = &1; // the `&1` is promoted to a constant, but it used to be that only the pointer is marked static, not the pointee

0 commit comments

Comments
 (0)