@@ -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- "either `globally` (when used without an argument), `coherence ` (default) or `no `" ;
406+ "a comma separated list of solver configurations: `globally ` (default), and `coherence `" ;
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 =
@@ -1105,16 +1105,27 @@ mod parse {
11051105 }
11061106 }
11071107
1108- pub ( crate ) fn parse_next_solver_config ( slot : & mut NextSolverConfig , v : Option < & str > ) -> bool {
1108+ pub ( crate ) fn parse_next_solver_config (
1109+ slot : & mut Option < NextSolverConfig > ,
1110+ v : Option < & str > ,
1111+ ) -> bool {
11091112 if let Some ( config) = v {
1110- * slot = match config {
1111- "no" => NextSolverConfig { coherence : false , globally : false } ,
1112- "coherence" => NextSolverConfig { coherence : true , globally : false } ,
1113- "globally" => NextSolverConfig { coherence : true , globally : true } ,
1114- _ => return false ,
1115- } ;
1113+ let mut coherence = false ;
1114+ let mut globally = true ;
1115+ for c in config. split ( ',' ) {
1116+ match c {
1117+ "globally" => globally = true ,
1118+ "coherence" => {
1119+ globally = false ;
1120+ coherence = true ;
1121+ }
1122+ _ => return false ,
1123+ }
1124+ }
1125+
1126+ * slot = Some ( NextSolverConfig { coherence : coherence || globally, globally } ) ;
11161127 } else {
1117- * slot = NextSolverConfig { coherence : true , globally : true } ;
1128+ * slot = Some ( NextSolverConfig { coherence : true , globally : true } ) ;
11181129 }
11191130
11201131 true
@@ -1867,7 +1878,7 @@ options! {
18671878 "the size at which the `large_assignments` lint starts to be emitted" ) ,
18681879 mutable_noalias: bool = ( true , parse_bool, [ TRACKED ] ,
18691880 "emit noalias metadata for mutable references (default: yes)" ) ,
1870- next_solver: NextSolverConfig = ( NextSolverConfig :: default ( ) , parse_next_solver_config, [ TRACKED ] ,
1881+ next_solver: Option < NextSolverConfig > = ( None , parse_next_solver_config, [ TRACKED ] ,
18711882 "enable and configure the next generation trait solver used by rustc" ) ,
18721883 nll_facts: bool = ( false , parse_bool, [ UNTRACKED ] ,
18731884 "dump facts from NLL analysis into side files (default: no)" ) ,
0 commit comments