Add unsafe to no_mangle incremental tests

This commit is contained in:
Jonathan Brouwer 2025-12-02 20:10:40 +01:00
parent 31d289c9bc
commit 1d204fcf1d
No known key found for this signature in database
GPG key ID: 13619B051B673C52
4 changed files with 7 additions and 6 deletions

View file

@ -279,7 +279,7 @@ pub fn no_mangle() {}
#[rustc_clean(cfg = "cfail3")]
#[rustc_clean(cfg = "cfail5")]
#[rustc_clean(cfg = "cfail6")]
#[no_mangle]
#[unsafe(no_mangle)]
pub fn no_mangle() {}
// Linkage ---------------------------------------------------------------------

View file

@ -5,6 +5,7 @@
// and make sure that the hash has changed, then change nothing between rev2 and
// rev3 and make sure that the hash has not changed.
//@ edition: 2024
//@ build-pass (FIXME(62277): could be check-pass?)
//@ revisions: cfail1 cfail2 cfail3 cfail4 cfail5 cfail6
//@ compile-flags: -Z query-dep-graph -O
@ -649,7 +650,7 @@ impl Foo {
//--------------------------
//--------------------------
//--------------------------
//----------
//------------------
pub fn add_no_mangle_to_method(&self) { }
}
@ -663,7 +664,7 @@ impl Foo {
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
#[no_mangle]
#[unsafe(no_mangle)]
pub fn add_no_mangle_to_method(&self) { }
}

View file

@ -66,7 +66,7 @@ static STATIC_NO_MANGLE: u8 = 0;
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
#[no_mangle]
#[unsafe(no_mangle)]
static STATIC_NO_MANGLE: u8 = 0;

View file

@ -569,7 +569,7 @@ impl AddNoMangleToMethod for Foo {
// -------------------------
// -------------------------
// -------------------------
// ---------
// -----------------
fn add_no_mangle_to_method(&self) { }
}
@ -583,7 +583,7 @@ impl AddNoMangleToMethod for Foo {
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5")]
#[rustc_clean(cfg="cfail6")]
#[no_mangle]
#[unsafe(no_mangle)]
fn add_no_mangle_to_method(&self) { }
}