mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
04dfc2b595
Modify error message of importing inherent associated items when `#[feature(import_trait_associated_functions)]` is enabled Fixes rust-lang/rust#148009 This PR improves the diagnostic for importing inherent associated items from a struct or union when `#[feature(import_trait_associated_functions)]` (rust-lang/rust#134691) is enabled. Previously, this would result in a "not a module" error. This change provides a more specific error message clarifying that only trait associated items can be imported, while inherent associated items remain ineligible for import. Enums are currently excluded from this change because their variants are valid import targets and require distinct handling.