这是indexloc提供的服务,不要输入任何密码
Skip to content

#[no_mangle] should not be applied to non-ASCII items #2548

@tamaroning

Description

@tamaroning

Items with an ASCII name and #[no_mangle] should not compile.

input:

#[no_mangle]
pub fn () {}

pub fn main() {}

output: compiled.

expected: rustc's output

error[[E0754]](https://doc.rust-lang.org/stable/error_codes/E0754.html): `#[no_mangle]` requires ASCII identifier
 --> src/main.rs:2:1
  |
2 | pub fn () {}
  | ^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions