diff options
| author | Ralf Jung <post@ralfj.de> | 2024-06-24 10:51:49 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-06-24 14:35:08 +0200 |
| commit | 0f114ec41d5f1c5c4d2d77767014f0946c3f3cd5 (patch) | |
| tree | e43ec7b09fe9b4b97b9be7d20f155e91cdaf1474 | |
| parent | 4f8dc8fa3e5e50ab024252397d272f773f3a2a8d (diff) | |
| download | rust-0f114ec41d5f1c5c4d2d77767014f0946c3f3cd5.tar.gz rust-0f114ec41d5f1c5c4d2d77767014f0946c3f3cd5.zip | |
clarify the warning shown when optimizations are enabled
| -rw-r--r-- | src/tools/miri/src/bin/miri.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs index 829bfa7cd70..9d8e44ce409 100644 --- a/src/tools/miri/src/bin/miri.rs +++ b/src/tools/miri/src/bin/miri.rs @@ -98,10 +98,9 @@ impl rustc_driver::Callbacks for MiriCompilerCalls { } if tcx.sess.opts.optimize != OptLevel::No { - tcx.dcx().warn("Miri does not support optimizations. If you have enabled optimizations \ - by selecting a Cargo profile (such as --release) which changes other profile settings \ - such as whether debug assertions and overflow checks are enabled, those settings are \ - still applied."); + tcx.dcx().warn("Miri does not support optimizations: the opt-level is ignored. The only effect \ + of selecting a Cargo profile that enables optimizations (such as --release) is to apply \ + its remaining settings, such as whether debug assertions and overflow checks are enabled."); } if tcx.sess.mir_opt_level() > 0 { tcx.dcx().warn("You have explicitly enabled MIR optimizations, overriding Miri's default \ |
