@@ -403,7 +403,7 @@ mod desc {
403403 pub ( crate ) const parse_unpretty: & str = "`string` or `string=string`" ;
404404 pub ( crate ) const parse_treat_err_as_bug: & str = "either no value or a non-negative number" ;
405405 pub ( crate ) const parse_next_solver_config: & str =
406- "a comma separated list of solver configurations: `globally ` (default), and `coherence `" ;
406+ "either `globally` (when used without an argument), `coherence ` (default) or `no `" ;
407407 pub ( crate ) const parse_lto: & str =
408408 "either a boolean (`yes`, `no`, `on`, `off`, etc), `thin`, `fat`, or omitted" ;
409409 pub ( crate ) const parse_linker_plugin_lto: & str =
@@ -1123,27 +1123,16 @@ mod parse {
11231123 }
11241124 }
11251125
1126- pub ( crate ) fn parse_next_solver_config (
1127- slot : & mut Option < NextSolverConfig > ,
1128- v : Option < & str > ,
1129- ) -> bool {
1126+ pub ( crate ) fn parse_next_solver_config ( slot : & mut NextSolverConfig , v : Option < & str > ) -> bool {
11301127 if let Some ( config) = v {
1131- let mut coherence = false ;
1132- let mut globally = true ;
1133- for c in config. split ( ',' ) {
1134- match c {
1135- "globally" => globally = true ,
1136- "coherence" => {
1137- globally = false ;
1138- coherence = true ;
1139- }
1140- _ => return false ,
1141- }
1142- }
1143-
1144- * slot = Some ( NextSolverConfig { coherence : coherence || globally, globally } ) ;
1128+ * slot = match config {
1129+ "no" => NextSolverConfig { coherence : false , globally : false } ,
1130+ "coherence" => NextSolverConfig { coherence : true , globally : false } ,
1131+ "globally" => NextSolverConfig { coherence : true , globally : true } ,
1132+ _ => return false ,
1133+ } ;
11451134 } else {
1146- * slot = Some ( NextSolverConfig { coherence : true , globally : true } ) ;
1135+ * slot = NextSolverConfig { coherence : true , globally : true } ;
11471136 }
11481137
11491138 true
@@ -1914,7 +1903,7 @@ options! {
19141903 "the size at which the `large_assignments` lint starts to be emitted" ) ,
19151904 mutable_noalias: bool = ( true , parse_bool, [ TRACKED ] ,
19161905 "emit noalias metadata for mutable references (default: yes)" ) ,
1917- next_solver: Option < NextSolverConfig > = ( None , parse_next_solver_config, [ TRACKED ] ,
1906+ next_solver: NextSolverConfig = ( NextSolverConfig :: default ( ) , parse_next_solver_config, [ TRACKED ] ,
19181907 "enable and configure the next generation trait solver used by rustc" ) ,
19191908 nll_facts: bool = ( false , parse_bool, [ UNTRACKED ] ,
19201909 "dump facts from NLL analysis into side files (default: no)" ) ,
0 commit comments