Rust errors / Names, paths and imports
Rust compiler error · checked with rustc 1.99.0
Rust error E0648: `export_name` may not contain null characters
What it meansAn export_name attribute contains null characters (\0).
What rustc prints
error[E0648]: `export_name` may not contain null characters
--> main.rs:1:1
|
1 | #[export_name="\0foo"] // error: `export_name` may not contain null characters
| ^^^^^^^^^^^^^^^^^^^^^^Real output of rustc 1.99.0 compiling the official example below (2021 edition). Your names and line numbers will differ; the first line is the part to match.
The compiler team's explanation
An export_name attribute contains null characters (\0).
Erroneous code example:
#[export_name="\0foo"] // error: `export_name` may not contain null characters
pub fn bar() {}
To fix this error, remove the null characters:
#[export_name="foo"] // ok!
pub fn bar() {}From rustc --explain E0648 (1.99.0), part of the Rust project, MIT or Apache-2.0. Official page.
Related errors
- E0425cannot find value in this scope
- E0603is private
- E0432unresolved import
- E0005refutable pattern in local binding
- E0624method `method` is private
- E0639This error indicates that the struct, enum or enum variant cannot be instantiated from outside of the defining crate as it has been marked as `non_exhaustive` and as such more fields/variants may be added in future that could cause adverse side effects for this code
- E0710unknown tool name `clipp` found in scoped lint: `clipp::filter_map`
- E0711feature `foo` is declared stable since 1.29.0, but was previously declared stable since 1.0.0
Up next
Often hit nextE0425: cannot find value in this scopeA related error from the same family.Read it next →Did this answer your question?