Landing: 4980b1406464
Project / Subsystem
gcc / gccrs
Date
2026-06-27
Author
Lucas Ly Ba
Commit
4980b14064649b7d44f5ea12eb34790f0c8d06d2
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gccrs
- patch_id
- —
- commit_hash
- 4980b14064649b7d44f5ea12eb34790f0c8d06d2
- source_type
- github
- headline
- Warn on no-mangle generics in gccrs
- tldr
- gccrs now warns when `#[no_mangle]` or `#[export_name]` is applied to generic Rust functions.
- author
- Lucas Ly Ba
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • rust
- • compiler
- • lint
- • generics
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-27T00:00:00.000Z
The gccrs compiler now issues a warning if a generic Rust function is annotated with #[no_mangle] or #[export_name]. These attributes have no effect on generic functions because generic items require mangling to be uniquely identified, and the compiler will now flag this ineffectual usage.