Skip to content

Commit f5734cb

Browse files
committed
print deprecation message for -Car too
1 parent bc20586 commit f5734cb

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

compiler/rustc_session/src/options.rs

Lines changed: 2 additions & 1 deletion
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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ check-pass
2+
//@ compile-flags: -Car=foo
3+
4+
fn main() {}
Lines changed: 2 additions & 0 deletions
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)