Skip to content

Commit 57d088a

Browse files
authored
Mention explicit_builtin_cfgs_in_flags lint cfg chapter
1 parent 4d92113 commit 57d088a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/conditional-compilation.md

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ configuration option from within the source code of the crate being compiled.
8989
9090
> [!WARNING]
9191
> Arbitrarily-set configuration options can clash with compiler-set configuration options. For example, it is possible to do `rustc --cfg "unix" program.rs` while compiling to a Windows target, and have both `unix` and `windows` configuration options set at the same time. Doing this would be unwise.
92+
>
93+
> Since Rust 1.82 `rustc` prevents setting configuration options that can clash with it's set of builtin configurations with the deny-by-default [`explicit_builtin_cfgs_in_flags`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#explicit-builtin-cfgs-in-flags) lint.
9294
9395
r[cfg.target_arch]
9496
### `target_arch`

0 commit comments

Comments
 (0)