Skip to content

Commit

Permalink
Auto merge of #114710 - Urgau:fix-expect-dead_code-114557, r=cjgillot
Browse files Browse the repository at this point in the history
Respect `#[expect]` the same way `#[allow]` is with the `dead_code` lint

This PR makes the `#[expect]` attribute being respected in the same way the `#[allow]` attribute is with the `dead_code` lint.

The fix is much more involved than I would have liked (and it's not because I didn't tried!), because the implementation took advantage of the fact that firing a lint in a allow context is a nop (for the user, as the lint is suppressed) to not fire-it at all.

And will it's fine for `#[allow]`, it definitively isn't for `#[expect]`, as the presence and absence of the lint is significant. So a big part of the PR is just adding the context information of whenever an item is on the worklist because of an `[allow]`/`#[expect]` or not.

Fixes rust-lang/rust#114557
  • Loading branch information
bors committed Aug 12, 2023
2 parents 66a6e70 + 444e668 commit b549f23
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit b549f23

Please sign in to comment.