Skip to content

Commit 04a2cbd

Browse files
authored
Rollup merge of rust-lang#57132 - daxpedda:master, r=steveklabnik
Document that `-C opt-level=0` implies `-C debug-assertions`. I couldn't find it stated anywhere else (https://doc.rust-lang.org/nightly/rustc/codegen-options/index.html#opt-level). It was a problem before here: rust-lang#39449, it got lost in the migration to the new documentation I assume. On a sidenote: I think that `-C opt-level=0` having a sideeffect on another flag should be changed. Having compiler flags affecting others doesn't make much sense to me, they are used to fine tune anyway. In any case, this plays no role in this PR.
2 parents b9cb5db + 284f0d3 commit 04a2cbd

File tree

1 file changed

+1
-1
lines changed
  • src/doc/rustc/src/codegen-options

1 file changed

+1
-1
lines changed

src/doc/rustc/src/codegen-options/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ This flag lets you control debug information:
187187

188188
This flag lets you control the optimization level.
189189

190-
* `0`: no optimizations
190+
* `0`: no optimizations, also turn on `cfg(debug_assertions)`.
191191
* `1`: basic optimizations
192192
* `2`: some optimizations
193193
* `3`: all optimizations

0 commit comments

Comments
 (0)