Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 80aa6fa

Browse files
committed
Auto merge of rust-lang#130688 - workingjubilee:rollup-ovre6p7, r=workingjubilee
Rollup of 5 pull requests Successful merges: - rust-lang#130648 (move enzyme flags from general cargo to rustc-specific cargo) - rust-lang#130650 (Fixup Apple target's description strings) - rust-lang#130664 (Generate line numbers for non-rust code examples as well) - rust-lang#130665 (Prevent Deduplication of `LongRunningWarn`) - rust-lang#130669 (tests: Test that `extern "C" fn` ptrs lint on slices) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1f9a018 + f314db6 commit 80aa6fa

30 files changed

+247
-44
lines changed

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,14 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
641641
// current number of evaluated terminators is a power of 2. The latter gives us a cheap
642642
// way to implement exponential backoff.
643643
let span = ecx.cur_span();
644-
ecx.tcx.dcx().emit_warn(LongRunningWarn { span, item_span: ecx.tcx.span });
644+
// We store a unique number in `force_duplicate` to evade `-Z deduplicate-diagnostics`.
645+
// `new_steps` is guaranteed to be unique because `ecx.machine.num_evaluated_steps` is
646+
// always increasing.
647+
ecx.tcx.dcx().emit_warn(LongRunningWarn {
648+
span,
649+
item_span: ecx.tcx.span,
650+
force_duplicate: new_steps,
651+
});
645652
}
646653
}
647654

compiler/rustc_const_eval/src/errors.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ pub struct LongRunningWarn {
209209
pub span: Span,
210210
#[help]
211211
pub item_span: Span,
212+
// Used for evading `-Z deduplicate-diagnostics`.
213+
pub force_duplicate: usize,
212214
}
213215

214216
#[derive(Subdiagnostic)]

compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("ARM64 macOS (11.0+, Big Sur+)".into()),
9+
description: Some("ARM64 Apple macOS (11.0+, Big Sur+)".into()),
1010
tier: Some(1),
1111
host_tools: Some(true),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("ARM64 iOS".into()),
9+
description: Some("ARM64 Apple iOS".into()),
1010
tier: Some(2),
1111
host_tools: Some(false),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("Apple Catalyst on ARM64".into()),
9+
description: Some("ARM64 Apple Mac Catalyst".into()),
1010
tier: Some(2),
1111
host_tools: Some(false),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("Apple iOS Simulator on ARM64".into()),
9+
description: Some("ARM64 Apple iOS Simulator".into()),
1010
tier: Some(2),
1111
host_tools: Some(false),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("ARM64 tvOS".into()),
9+
description: Some("ARM64 Apple tvOS".into()),
1010
tier: Some(3),
1111
host_tools: Some(false),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("ARM64 tvOS Simulator".into()),
9+
description: Some("ARM64 Apple tvOS Simulator".into()),
1010
tier: Some(3),
1111
host_tools: Some(false),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("ARM64 Apple WatchOS".into()),
9+
description: Some("ARM64 Apple watchOS".into()),
1010
tier: Some(3),
1111
host_tools: Some(false),
1212
std: Some(true),

compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target {
66
Target {
77
llvm_target,
88
metadata: crate::spec::TargetMetadata {
9-
description: Some("ARM64 Apple WatchOS Simulator".into()),
9+
description: Some("ARM64 Apple watchOS Simulator".into()),
1010
tier: Some(3),
1111
host_tools: Some(false),
1212
std: Some(true),

0 commit comments

Comments
 (0)