File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,6 @@ impl Profiles {
322322 let release = match profile_kind {
323323 ProfileKind :: Release => true ,
324324 ProfileKind :: Custom ( ref s) if s == "bench" => true ,
325- ProfileKind :: Custom ( ref s) if s == "test" => false ,
326325 _ => false ,
327326 } ;
328327
@@ -397,7 +396,17 @@ impl Profiles {
397396 /// `[Finished]` line. It is not entirely accurate, since it doesn't
398397 /// select for the package that was actually built.
399398 pub fn base_profile ( & self , profile_kind : & ProfileKind ) -> CargoResult < Profile > {
400- match self . by_name . get ( profile_kind. name ( ) ) {
399+ let profile_name = if !self . named_profiles_enabled {
400+ match profile_kind {
401+ ProfileKind :: Release => "release" ,
402+ ProfileKind :: Custom ( ref s) if s == "bench" => "bench" ,
403+ _ => "dev" ,
404+ }
405+ } else {
406+ profile_kind. name ( )
407+ } ;
408+
409+ match self . by_name . get ( profile_name) {
401410 None => failure:: bail!( "Profile `{}` undefined" , profile_kind. name( ) ) ,
402411 Some ( r) => Ok ( r. get_profile ( None , true , UnitFor :: new_normal ( ) ) ) ,
403412 }
You can’t perform that action at this time.
0 commit comments