Skip to content

Naked functions do not require unsafety #32489

Closed
@nagisa

Description

@nagisa

RFC states that naked functions must either not contain any “safe” blocks or be unsafe themselves. Currently, code like

#![feature(asm, naked_functions)]

#[naked]
extern "win64" fn naked(x: u32) -> u32 {
    x + 1
}

is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSC-bugCategory: This is a bug.I-needs-decisionIssue: In need of a decision.T-langRelevant to the language team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions