Skip to content

Commit 0c96434

Browse files
authored
Merge pull request #1655 from Noratrieb/lint-deny-inside-forbid
Allow `deny` inside `forbid` as a no-op
2 parents 46d65f8 + 5fc70e7 commit 0c96434

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/attributes/diagnostics.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ pub mod m1 {
4343
```
4444

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

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

0 commit comments

Comments
 (0)