Skip to content

Commit 6e9038b

Browse files
committed
Clarify the ordering semantics of the on_unimplemented attribute
regarding options and compiler warnings.
1 parent a9fc409 commit 6e9038b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/3366-diagnostic-attribute-namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ In addition the `on_unimplemented` attribute provides mechanisms to specify for
134134

135135
The `any` and `all` options allow to combine multiple filter options. The `any` option matches if one of the supplied filter options evaluates to `true`, the `all` option requires that all supplied filter options evaluate to true. `not` allows to negate a given filter option. It evaluates to `true` if the inner filter option evaluates to `false`. These options can be nested to construct complex filters.
136136

137-
The `on_unimplemented` attribute can be applied multiple times to the same trait definition. Multiple attributes are evaluated in order. The first matching instance for each of the `message`/`label`/`note` options is emitted.
137+
The `on_unimplemented` attribute can be applied multiple times to the same trait definition. Multiple attributes are evaluated in order. The first matching instance for each of the `message`/`label`/`note` options is emitted. The compiler may lint against ignored variants as this is the case for `match` arms for example.
138138
```rust
139139
#[diagnostic::on_unimplemented(
140140
if(Self = std::string::String),

0 commit comments

Comments
 (0)