Skip to content

Commit 81577d3

Browse files
committed
Update allowed-positions
Some word cleanup and a hidden clarification.
1 parent d3e48d1 commit 81577d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/attributes/type_system.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ r[attributes.type-system.non_exhaustive.syntax]
4242
The `non_exhaustive` attribute uses the [MetaWord] syntax and thus does not take any inputs.
4343
4444
r[attributes.type-system.non_exhaustive.allowed-positions]
45-
It can be applied to [`struct`s][struct], [`enum`s][enum], and `enum` variants.
45+
The `non_exhaustive` attribute may only be applied to [`struct`s][struct], [`enum`s][enum], and `enum` variants.
46+
47+
> [!NOTE]
48+
> `rustc` currently warns in some other positions, but this may be rejected in the future.
4649
4750
r[attributes.type-system.non_exhaustive.same-crate]
4851
Within the defining crate, `non_exhaustive` has no effect.

0 commit comments

Comments
 (0)