File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,6 @@ impl Profiles {
322
322
let release = match profile_kind {
323
323
ProfileKind :: Release => true ,
324
324
ProfileKind :: Custom ( ref s) if s == "bench" => true ,
325
- ProfileKind :: Custom ( ref s) if s == "test" => false ,
326
325
_ => false ,
327
326
} ;
328
327
@@ -397,7 +396,17 @@ impl Profiles {
397
396
/// `[Finished]` line. It is not entirely accurate, since it doesn't
398
397
/// select for the package that was actually built.
399
398
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) {
401
410
None => failure:: bail!( "Profile `{}` undefined" , profile_kind. name( ) ) ,
402
411
Some ( r) => Ok ( r. get_profile ( None , true , UnitFor :: new_normal ( ) ) ) ,
403
412
}
You can’t perform that action at this time.
0 commit comments