-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
legacy_directory_ownership future-compatibility warnings #37872
Copy link
Copy link
Closed
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is the summary issue for the
legacy_directory_ownershipfuture-compatibility warning and other related errors. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made.What is the warning for?
The
legacy_directory_ownershipwarning is issued when#[path]attribute (e.g.#[path = "foo.rs"] mod bar;),#[path]attribute.The warning can be fixed by renaming the parent module to "mod.rs" and moving it into its own directory if appropriate.
We are making this a warning so that the directory ownership rules apply more consistently to modules with
#[path]attributes. This is described in more detail in #37602.When will this warning become a hard error?
At the beginning of each 6-week release cycle, the Rust compiler team will review the set of outstanding future compatibility warnings and nominate some of them for Final Comment Period. Toward the end of the cycle, we will review any comments and make a final determination whether to convert the warning into a hard error or remove it entirely.
Current status
legacy_directory_ownershiplint as warn-by-defaultlegacy_directory_ownershiplint deny-by-defaultlegacy_directory_ownershiplint a hard error