@@ -306,6 +306,7 @@ type OptionSetter<O> = fn(&mut O, v: Option<&str>) -> Result<(), ParseError>;
306
306
307
307
pub enum ParseError {
308
308
Invalid ,
309
+ Removed ( & ' static str ) ,
309
310
}
310
311
311
312
type OptionDescrs < O > = & ' static [ ( & ' static str , OptionSetter < O > , & ' static str , & ' static str ) ] ;
@@ -343,6 +344,10 @@ fn build_options<O: Default>(
343
344
) ,
344
345
) ,
345
346
} ,
347
+ Err ( ParseError :: Removed ( in_favor_of) ) => early_error (
348
+ error_format,
349
+ & format ! ( "{outputname} option `{key}` removed in favor of `{in_favor_of}`" ) ,
350
+ ) ,
346
351
} ,
347
352
None => early_error ( error_format, & format ! ( "unknown {outputname} option: `{key}`" ) ) ,
348
353
}
@@ -388,6 +393,7 @@ mod desc {
388
393
pub const parse_treat_err_as_bug: & str = "either no value or a number bigger than 0" ;
389
394
pub const parse_trait_solver: & str =
390
395
"one of the supported solver modes (`classic`, `chalk`, or `next`)" ;
396
+ pub const parse_chalk: & str = "" ;
391
397
pub const parse_lto: & str =
392
398
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted" ;
393
399
pub const parse_linker_plugin_lto: & str =
@@ -955,6 +961,10 @@ mod parse {
955
961
Ok ( ( ) )
956
962
}
957
963
964
+ pub ( crate ) fn parse_chalk ( _slot : & mut ( ) , _v : Option < & str > ) -> Result < ( ) , ParseError > {
965
+ Err ( ParseError :: Removed ( "-Z trait-solver=chalk" ) )
966
+ }
967
+
958
968
pub ( crate ) fn parse_lto ( slot : & mut LtoCli , v : Option < & str > ) -> Result < ( ) , ParseError > {
959
969
if v. is_some ( ) {
960
970
let mut bool_arg = None ;
@@ -1351,6 +1361,8 @@ options! {
1351
1361
"instrument control-flow architecture protection" ) ,
1352
1362
cgu_partitioning_strategy: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
1353
1363
"the codegen unit partitioning strategy to use" ) ,
1364
+ chalk: ( ) = ( ( ) , parse_chalk, [ UNTRACKED ] ,
1365
+ "enable chalk solver -- deprecated, use `-Z trait-solver=chalk`" ) ,
1354
1366
codegen_backend: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
1355
1367
"the backend to use" ) ,
1356
1368
combine_cgu: bool = ( false , parse_bool, [ TRACKED ] ,
0 commit comments