Skip to content

Commit

Permalink
Merge pull request #1655 from Noratrieb/lint-deny-inside-forbid
Browse files Browse the repository at this point in the history
Allow `deny` inside `forbid` as a no-op
  • Loading branch information
ehuss authored Oct 21, 2024
2 parents 46d65f8 + 5fc70e7 commit 0c96434
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 0c96434

Please sign in to comment.