Skip to content

Commit e389ff7

Browse files
committed
Remove unused profile support for -Zpanic-abort-tests
1 parent 5e09899 commit e389ff7

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/cargo/core/profiles.rs

+3-17
Original file line numberDiff line numberDiff line change
@@ -234,24 +234,14 @@ impl Profiles {
234234
unit_for: UnitFor,
235235
kind: CompileKind,
236236
) -> Profile {
237-
let (profile_name, inherits) = (self.requested_profile, None);
238-
let maker = self.get_profile_maker(profile_name).unwrap();
237+
let maker = self.get_profile_maker(self.requested_profile).unwrap();
239238
let mut profile = maker.get_profile(Some(pkg_id), is_member, unit_for.is_for_host());
240239

241240
// Dealing with `panic=abort` and `panic=unwind` requires some special
242241
// treatment. Be sure to process all the various options here.
243242
match unit_for.panic_setting() {
244243
PanicSetting::AlwaysUnwind => profile.panic = PanicStrategy::Unwind,
245244
PanicSetting::ReadProfile => {}
246-
PanicSetting::Inherit => {
247-
if let Some(inherits) = inherits {
248-
// TODO: Fixme, broken with named profiles.
249-
let maker = self.get_profile_maker(inherits).unwrap();
250-
profile.panic = maker
251-
.get_profile(Some(pkg_id), is_member, unit_for.is_for_host())
252-
.panic;
253-
}
254-
}
255245
}
256246

257247
// Default macOS debug information to being stored in the "unpacked"
@@ -285,7 +275,7 @@ impl Profiles {
285275
if !is_local {
286276
profile.incremental = false;
287277
}
288-
profile.name = profile_name;
278+
profile.name = self.requested_profile;
289279
profile
290280
}
291281

@@ -840,10 +830,6 @@ enum PanicSetting {
840830
/// Indicates that this unit will read its `profile` setting and use
841831
/// whatever is configured there.
842832
ReadProfile,
843-
844-
/// This unit will ignore its `panic` setting in its profile and will
845-
/// instead inherit it from the `dev` or `release` profile, as appropriate.
846-
Inherit,
847833
}
848834

849835
impl UnitFor {
@@ -909,7 +895,7 @@ impl UnitFor {
909895
// (basically avoid recompiles) but historical defaults required
910896
// that we always unwound.
911897
panic_setting: if config.cli_unstable().panic_abort_tests {
912-
PanicSetting::Inherit
898+
PanicSetting::ReadProfile
913899
} else {
914900
PanicSetting::AlwaysUnwind
915901
},

0 commit comments

Comments
 (0)