Files
rust/compiler/rustc_interface
Jonathan Brouwer c6fbd9f8a7 Rollup merge of #154498 - RalfJung:option-deprecations, r=fmease
turn some long-deprecated -C options into errors

- `-Car` has been documented to do nothing for more than 8 years (https://github.com/rust-lang/rust/commit/691ab6c5bf597e98a4bae94b9a433f029f9ca9c1)  and causes a warning for more than a year (https://github.com/rust-lang/rust/pull/135126).
- `-Cno-stack-check` has been made a NOP and deprecated with a warning more than 9 years ago (https://github.com/rust-lang/rust/commit/c670293630611cdf677cfc5bc9a17ba378f78b84)
- `-Cinline-threshold` has been made a NOP and deprecated with a warning almost 2 years ago (https://github.com/rust-lang/rust/pull/124712).

With them being ignored there's always a risk someone thinks they'll do something and they don't notice the warning. I think these have been deprecated for long enough that we can turn them into hard errors.

Also change the type of these fields to `()` so there's no information here that the rest of the compiler could use. This supersedes the `rustc_lint_opt_deny_field_access` trick.

MCP: https://github.com/rust-lang/compiler-team/issues/978
2026-05-08 11:35:31 +02:00
..