@@ -382,6 +382,8 @@ mod desc {
382
382
"`all` (default), `except-unused-generics`, `except-unused-functions`, or `off`" ;
383
383
pub const parse_unpretty: & str = "`string` or `string=string`" ;
384
384
pub const parse_treat_err_as_bug: & str = "either no value or a number bigger than 0" ;
385
+ pub const parse_trait_solver: & str =
386
+ "one of the supported solver modes (`stock`, `chalk`, or `next`)" ;
385
387
pub const parse_lto: & str =
386
388
"either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted" ;
387
389
pub const parse_linker_plugin_lto: & str =
@@ -880,6 +882,16 @@ mod parse {
880
882
}
881
883
}
882
884
885
+ pub ( crate ) fn parse_trait_solver ( slot : & mut TraitSolver , v : Option < & str > ) -> bool {
886
+ match v {
887
+ Some ( "stock" ) => * slot = TraitSolver :: Stock ,
888
+ Some ( "chalk" ) => * slot = TraitSolver :: Chalk ,
889
+ Some ( "next" ) => * slot = TraitSolver :: Next ,
890
+ _ => return false ,
891
+ }
892
+ true
893
+ }
894
+
883
895
pub ( crate ) fn parse_lto ( slot : & mut LtoCli , v : Option < & str > ) -> bool {
884
896
if v. is_some ( ) {
885
897
let mut bool_arg = None ;
@@ -1249,8 +1261,6 @@ options! {
1249
1261
"instrument control-flow architecture protection" ) ,
1250
1262
cgu_partitioning_strategy: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
1251
1263
"the codegen unit partitioning strategy to use" ) ,
1252
- chalk: bool = ( false , parse_bool, [ TRACKED ] ,
1253
- "enable the experimental Chalk-based trait solving engine" ) ,
1254
1264
codegen_backend: Option <String > = ( None , parse_opt_string, [ TRACKED ] ,
1255
1265
"the backend to use" ) ,
1256
1266
combine_cgu: bool = ( false , parse_bool, [ TRACKED ] ,
@@ -1609,6 +1619,8 @@ options! {
1609
1619
"for every macro invocation, print its name and arguments (default: no)" ) ,
1610
1620
track_diagnostics: bool = ( false , parse_bool, [ UNTRACKED ] ,
1611
1621
"tracks where in rustc a diagnostic was emitted" ) ,
1622
+ trait_solver: TraitSolver = ( TraitSolver :: Stock , parse_trait_solver, [ TRACKED ] ,
1623
+ "specify the trait solver mode used by rustc (default: stock)" ) ,
1612
1624
// Diagnostics are considered side-effects of a query (see `QuerySideEffects`) and are saved
1613
1625
// alongside query results and changes to translation options can affect diagnostics - so
1614
1626
// translation options should be tracked.
0 commit comments