Skip to content

const extern fn's dont need fn specifier #68062

Closed
@DutchGhost

Description

@DutchGhost

The following program compiles, and prints 1:

#![feature(const_extern_fn)]

const extern "Rust" PUT_ANYTHING_YOU_WANT_HERE bug() -> usize { 1 }

fn main() {
    dbg!(bug());
}

Metadata

Metadata

Assignees

Labels

A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.F-const_extern_fn`#![feature(const_extern_fn)]`P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions