Skip to content

Commit 0b3e60d

Browse files
Add unsafe to no_mangle incremental tests
1 parent c25a56b commit 0b3e60d

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

tests/incremental/hashes/function_interfaces.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub fn no_mangle() {}
279279
#[rustc_clean(cfg = "cfail3")]
280280
#[rustc_clean(cfg = "cfail5")]
281281
#[rustc_clean(cfg = "cfail6")]
282-
#[no_mangle]
282+
#[unsafe(no_mangle)]
283283
pub fn no_mangle() {}
284284

285285
// Linkage ---------------------------------------------------------------------

tests/incremental/hashes/inherent_impls.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// and make sure that the hash has changed, then change nothing between rev2 and
66
// rev3 and make sure that the hash has not changed.
77

8+
//@ edition: 2024
89
//@ build-pass (FIXME(62277): could be check-pass?)
910
//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
1011
//@ compile-flags: -Z query-dep-graph -O
@@ -649,7 +650,7 @@ impl Foo {
649650
//--------------------------
650651
//--------------------------
651652
//--------------------------
652-
//----------
653+
//------------------
653654
pub fn add_no_mangle_to_method(&self) { }
654655
}
655656

@@ -663,7 +664,7 @@ impl Foo {
663664
#[rustc_clean(cfg="cfail3")]
664665
#[rustc_clean(cfg="cfail5")]
665666
#[rustc_clean(cfg="cfail6")]
666-
#[no_mangle]
667+
#[unsafe(no_mangle)]
667668
pub fn add_no_mangle_to_method(&self) { }
668669
}
669670

tests/incremental/hashes/statics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static STATIC_NO_MANGLE: u8 = 0;
6666
#[rustc_clean(cfg="cfail3")]
6767
#[rustc_clean(cfg="cfail5")]
6868
#[rustc_clean(cfg="cfail6")]
69-
#[no_mangle]
69+
#[unsafe(no_mangle)]
7070
static STATIC_NO_MANGLE: u8 = 0;
7171

7272

tests/incremental/hashes/trait_impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ impl AddNoMangleToMethod for Foo {
569569
// -------------------------
570570
// -------------------------
571571
// -------------------------
572-
// ---------
572+
// -----------------
573573
fn add_no_mangle_to_method(&self) { }
574574
}
575575

@@ -583,7 +583,7 @@ impl AddNoMangleToMethod for Foo {
583583
#[rustc_clean(cfg="cfail3")]
584584
#[rustc_clean(cfg="cfail5")]
585585
#[rustc_clean(cfg="cfail6")]
586-
#[no_mangle]
586+
#[unsafe(no_mangle)]
587587
fn add_no_mangle_to_method(&self) { }
588588
}
589589

0 commit comments

Comments
 (0)