Skip to content

Cannot use unicode identifiers in --extern flags #134250

Open
@Nemo157

Description

@Nemo157

I tried this code:

> rustc --crate-name öwö --crate-type lib - <<<'pub fn öwö() {}'
> rustc --crate-name ūwū --crate-type bin --extern öwö=liböwö.rlib - <<<'fn main() { öwö::öwö(); }'

I expected to see this happen: successful compilation

Instead, this happened:

error: crate name `öwö` passed to `--extern` is not a valid ASCII identifier

Meta

rustc --version --verbose:

rustc 1.85.0 (c44b3d50f 2024-12-03)
binary: rustc
commit-hash: c44b3d50fea96a3e0417e8264c16ea21a0a3fca2
commit-date: 2024-12-03
host: x86_64-unknown-linux-gnu
release: 1.85.0
LLVM version: 19.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UnicodeArea: UnicodeA-cratesArea: Crates and their interactions (like crate loading)A-metadataArea: Crate metadataC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-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