@@ -306,6 +306,7 @@ type OptionSetter<O> = fn(&mut O, v: Option<&str>) -> Result<(), ParseError>;
306306
307307pub enum ParseError {
308308 Invalid ,
309+ Removed ( & ' static str ) ,
309310}
310311
311312type OptionDescrs < O > = & ' static [ ( & ' static str , OptionSetter < O > , & ' static str , & ' static str ) ] ;
@@ -343,6 +344,10 @@ fn build_options<O: Default>(
343344 ) ,
344345 ) ,
345346 } ,
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+ ) ,
346351 } ,
347352 None => early_error ( error_format, & format ! ( "unknown {outputname} option: `{key}`" ) ) ,
348353 }
@@ -388,6 +393,7 @@ mod desc {
388393 pub const parse_treat_err_as_bug: & str = "either no value or a number bigger than 0" ;
389394 pub const parse_trait_solver: & str =
390395 "one of the supported solver modes (`classic`, `chalk`, or `next`)" ;
396+ pub const parse_chalk: & str = "" ;
391397 pub const parse_lto: & str =
392398 "either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted" ;
393399 pub const parse_linker_plugin_lto: & str =
@@ -955,6 +961,10 @@ mod parse {
955961 Ok ( ( ) )
956962 }
957963
964+ pub ( crate ) fn parse_chalk ( _slot : & mut ( ) , _v : Option < & str > ) -> Result < ( ) , ParseError > {
965+ Err ( ParseError :: Removed ( "-Z trait-solver=chalk" ) )
966+ }
967+
958968 pub ( crate ) fn parse_lto ( slot : & mut LtoCli , v : Option < & str > ) -> Result < ( ) , ParseError > {
959969 if v. is_some ( ) {
960970 let mut bool_arg = None ;
@@ -1351,6 +1361,8 @@ options! {
13511361 "instrument control-flow architecture protection" ) ,
13521362 cgu_partitioning_strategy: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
13531363 "the codegen unit partitioning strategy to use" ) ,
1364+ chalk: ( ) = ( ( ) , parse_chalk, [ UNTRACKED ] ,
1365+ "enable chalk solver -- deprecated, use `-Z trait-solver=chalk`" ) ,
13541366 codegen_backend: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
13551367 "the backend to use" ) ,
13561368 combine_cgu: bool = ( false , parse_bool, [ TRACKED ] ,
0 commit comments