FRIDAY, JULY 10, 2026
gccrs
GCC Rust frontend registers `rustc_conversion_suggestion` attribute stub
GCC Rust frontend registers `rustc_conversion_suggestion` attribute as a stub, emitting a warning.
GCC’s Rust frontend now registers the rustc_conversion_suggestion attribute. This is a stub implementation required for compiling the Rust alloc crate. Encountering this attribute will result in a compiler warning, with full handling deferred.
In Details
The rustc_conversion_suggestion attribute is registered in gcc/rust/checks/errors/rust-builtin-attribute-checker.cc and its definition added to gcc/rust/util/rust-attributes.cc. It's implemented as a stub that warns, as full support depends on infra not yet present in gccrs.
For Context
- attribute
- A form of metadata that can be attached to code elements (like functions or types) to provide additional information to the compiler or runtime, influencing behavior or enabling specific features.
- alloc crate
- A standard Rust library crate providing memory allocation functionality, crucial for many Rust programs.
- stub implementation
- A placeholder implementation of a function or feature that provides basic functionality or a defined behavior (like emitting a warning) without the full logic, often used when a feature is not yet complete.