1
Fork 0
rust/compiler/rustc_passes/src
bors 1e836d12d3 Auto merge of #114710 - Urgau:fix-expect-dead_code-114557, r=cjgillot
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 https://github.com/rust-lang/rust/issues/114557
2023-08-12 15:14:42 +00:00
..
liveness Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
check_attr.rs check_attrs: Warn when #[macro_export] is used on macros 2.0 2023-08-07 21:14:28 +02:00
check_const.rs inline format!() args from rustc_codegen_llvm to the end (4) 2023-07-25 23:20:28 +02:00
dead.rs Auto merge of #114710 - Urgau:fix-expect-dead_code-114557, r=cjgillot 2023-08-12 15:14:42 +00:00
debugger_visualizer.rs Don't sort output of debugger_visualizer query because it already is in deterministic order. 2023-05-17 16:02:22 +02:00
diagnostic_items.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
entry.rs rustc: Move crate_types from Session to GlobalCtxt 2023-08-09 14:17:54 +08:00
errors.rs check_attrs: Warn when #[macro_export] is used on macros 2.0 2023-08-07 21:14:28 +02:00
hir_id_validator.rs inline format!() args from rustc_codegen_llvm to the end (4) 2023-07-25 23:20:28 +02:00
hir_stats.rs inline format!() args from rustc_codegen_llvm to the end (4) 2023-07-25 23:20:28 +02:00
lang_items.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
layout_test.rs Store the laziness of type aliases in the DefKind 2023-08-07 15:54:31 +02:00
lib.rs Turn debugger_visualizers from feed- into regular query. 2023-05-16 18:50:36 +02:00
lib_features.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
liveness.rs Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
loops.rs Separate AnonConst from ConstBlock in HIR. 2023-06-02 21:25:18 +00:00
naked_functions.rs hir: Add Become expression kind 2023-06-26 08:56:32 +00:00
reachable.rs rustc: Move crate_types from Session to GlobalCtxt 2023-08-09 14:17:54 +08:00
stability.rs lower impl const to bind to host effect param 2023-08-06 13:34:53 +00:00
upvars.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
weak_lang_items.rs rustc: Move crate_types from Session to GlobalCtxt 2023-08-09 14:17:54 +08:00