Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
sym::naked,
sym::instruction_set,
sym::repr,
sym::rustc_std_internal_symbol,
// code generation
sym::cold,
// documentation
Expand Down
8 changes: 7 additions & 1 deletion tests/ui/asm/naked-functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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));
}
Loading