Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 69a4eaa

Browse files
committed
Auto merge of rust-lang#2410 - rust-lang:miri_auto_ops, r=RalfJung
Some cleanups and docs around the auto ops
2 parents 46d309f + 9e7f3cd commit 69a4eaa

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,15 @@ to `.vscode/settings.json` in your local Miri clone:
168168
"./cargo-miri/Cargo.toml"
169169
],
170170
"rust-analyzer.checkOnSave.overrideCommand": [
171+
"env",
172+
"MIRI_AUTO_OPS=no",
171173
"./miri",
172174
"check",
173175
"--message-format=json"
174176
],
175177
"rust-analyzer.buildScripts.overrideCommand": [
178+
"env",
179+
"MIRI_AUTO_OPS=no",
176180
"./miri",
177181
"check",
178182
"--message-format=json",

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ Some native rustc `-Z` flags are also very relevant for Miri:
393393

394394
Moreover, Miri recognizes some environment variables:
395395

396+
* `MIRI_AUTO_OPS` indicates whether the automatic execution of rustfmt, clippy and rustup-toolchain
397+
should be skipped. If it is set to any value, they are skipped. This is used for avoiding
398+
infinite recursion in `./miri` and to allow automated IDE actions to avoid the auto ops.
396399
* `MIRI_LOG`, `MIRI_BACKTRACE` control logging and backtrace printing during
397400
Miri executions, also [see "Testing the Miri driver" in `CONTRIBUTING.md`][testing-miri].
398401
* `MIRIFLAGS` (recognized by `cargo miri` and the test suite) defines extra

miri

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ EOF
5353
MIRIDIR=$(python3 -c 'import os, sys; print(os.path.dirname(os.path.realpath(sys.argv[1])))' "$0")
5454

5555
## Run the auto-things.
56-
if [ -z "$AUTO_OPS" ]; then
57-
export AUTO_OPS=42
56+
if [ -z "$MIRI_AUTO_OPS" ]; then
57+
export MIRI_AUTO_OPS=42
5858

5959
# Run this first, so that the toolchain doesn't change after
6060
# other code has run.

0 commit comments

Comments
 (0)