mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add unsafe to no_mangle incremental tests
This commit is contained in:
@@ -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 ---------------------------------------------------------------------
|
||||
|
||||
@@ -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) { }
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#[rustc_clean(cfg="cfail3")]
|
||||
#[rustc_clean(cfg="cfail5")]
|
||||
#[rustc_clean(cfg="cfail6")]
|
||||
#[no_mangle]
|
||||
#[unsafe(no_mangle)]
|
||||
static STATIC_NO_MANGLE: u8 = 0;
|
||||
|
||||
|
||||
|
||||
@@ -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) { }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user