Skip to content

Commit 9bd7001

Browse files
committed
Update path for updated attribute template
1 parent ffedf0c commit 9bd7001

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/items/modules.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ alternately be expressed with `crate::util`'s contents in a file named
8484
> [!NOTE]
8585
> Prior to `rustc` 1.30, using `mod.rs` files was the way to load a module with nested children. It is encouraged to use the new naming convention as it is more consistent, and avoids having many files named `mod.rs` within a project.
8686
87+
<!-- template:attributes -->
8788
r[items.mod.outlined.path]
8889
### The `path` attribute
8990

@@ -104,13 +105,13 @@ r[items.mod.outlined.path.allowed-positions]
104105
The `path` attribute may only be applied to module declarations.
105106
106107
> [!NOTE]
107-
> `rustc` currently warns in other positions, but this may be rejected in the future.
108+
> `rustc` ignores use in other positions but lints against it. This may become an error in the future.
108109
109110
r[items.mod.outlined.path.duplicates]
110-
Only the first instance of `path` on a module is honored. Subsequent `path` attributes are ignored.
111+
Only the first use of `path` on a module has effect.
111112
112113
> [!NOTE]
113-
> `rustc` currently warns on following duplicate `path` attributes. This may become an error in the future.
114+
> `rustc` lints against any use following the first. This may become an error in the future.
114115
115116
r[items.mod.outlined.path.search]
116117
For `path` attributes on modules not inside inline module blocks, the file path is relative to the directory the source file is located. For example, the following code snippet would use the paths shown based on where it is located:

0 commit comments

Comments
 (0)