Skip to content

Commit 5334b5a

Browse files
committed
print deprecation message for -Car too
1 parent 6a7f3db commit 5334b5a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

compiler/rustc_session/src/options.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,8 @@ options! {
15531553
// tidy-alphabetical-start
15541554
#[rustc_lint_opt_deny_field_access("documented to do nothing")]
15551555
ar: String = (String::new(), parse_string, [UNTRACKED],
1556-
"this option is deprecated and does nothing"),
1556+
"this option is deprecated and does nothing",
1557+
deprecated_do_nothing: true),
15571558
#[rustc_lint_opt_deny_field_access("use `Session::code_model` instead of this field")]
15581559
code_model: Option<CodeModel> = (None, parse_code_model, [TRACKED],
15591560
"choose the code model to use (`rustc --print code-models` for details)"),

tests/ui/deprecation/deprecated_ar.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ check-pass
2+
//@ compile-flags: -Car=foo
3+
4+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
warning: `-C ar`: this option is deprecated and does nothing
2+

0 commit comments

Comments
 (0)