Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tamaroning opened this issue Aug 12, 2023 · 0 comments · Fixed by #2552
Closed

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

tamaroning opened this issue Aug 12, 2023 · 0 comments · Fixed by #2552

Comments

@tamaroning
Copy link
Contributor

tamaroning commented Aug 12, 2023

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 () {}
  | ^^^^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants