Skip to content

Commit e69fe00

Browse files
committed
Add attributes.type-system.non_exhaustive.duplicates
1 parent 81577d3 commit e69fe00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/attributes/type_system.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ The `non_exhaustive` attribute may only be applied to [`struct`s][struct], [`enu
4747
> [!NOTE]
4848
> `rustc` currently warns in some other positions, but this may be rejected in the future.
4949
50+
r[attributes.type-system.non_exhaustive.duplicates]
51+
Duplicate instances of the `non_exhaustive` attribute have no effect.
52+
53+
> [!NOTE]
54+
> `rustc` warns on subsequent duplicate `non_exhaustive` attributes.
55+
5056
r[attributes.type-system.non_exhaustive.same-crate]
5157
Within the defining crate, `non_exhaustive` has no effect.
5258

0 commit comments

Comments
 (0)