mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
allow #[rustc_std_internal_symbol] in combination with #[naked]
This commit is contained in:
@@ -625,6 +625,7 @@ fn check_naked(
|
||||
sym::naked,
|
||||
sym::instruction_set,
|
||||
sym::repr,
|
||||
sym::rustc_std_internal_symbol,
|
||||
// code generation
|
||||
sym::cold,
|
||||
// documentation
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//@ ignore-nvptx64
|
||||
//@ ignore-spirv
|
||||
|
||||
#![feature(asm_unwind, linkage)]
|
||||
#![feature(asm_unwind, linkage, rustc_attrs)]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
use std::arch::{asm, naked_asm};
|
||||
@@ -225,3 +225,9 @@ pub extern "C" fn compatible_doc_attributes() {
|
||||
pub extern "C" fn compatible_linkage() {
|
||||
naked_asm!("", options(raw));
|
||||
}
|
||||
|
||||
#[rustc_std_internal_symbol]
|
||||
#[unsafe(naked)]
|
||||
pub extern "C" fn rustc_std_internal_symbol() {
|
||||
naked_asm!("", options(raw));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user