GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gccrs

gccrs: Add test to highlight top core module collision

Adds a test case for Rust-GCC's top core module collision handling.

This commit introduces a new test case to Rust-GCC that specifically highlights collisions between top-level modules and extern crate names. It ensures that such errors are reported on the module itself, rather than the extern crate, which might lack a source location. This improves the accuracy and clarity of error messages related to module name conflicts.

In Details

A new test (rust/minicore/top_core_modules.rs) is added to gccrs to verify that collisions between top-level modules and extern crate names are correctly handled. The test ensures that errors are reported against the module, which has a source location, rather than the extern crate, which might not.

Filed Under: gccrsrustcompilertestingerror handling