Skip to content

Commit

Permalink
Allow deny inside forbid as a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
Noratrieb committed Oct 18, 2024
1 parent 46d65f8 commit 5fc70e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/attributes/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ pub mod m1 {
```

Lint attributes can override the level specified from a previous attribute, as
long as the level does not attempt to change a forbidden lint. Previous
attributes are those from a higher level in the syntax tree, or from a
long as the level does not attempt to change a forbidden lint
(except for `deny`, which is allowed inside a `forbid` context, but ignored).
Previous attributes are those from a higher level in the syntax tree, or from a
previous attribute on the same entity as listed in left-to-right source order.

This example shows how one can use `allow` and `warn` to toggle a particular
Expand Down

0 comments on commit 5fc70e7

Please sign in to comment.