rust/compiler/rustc_passes/src
Dylan DPC 9d378b33de
Rollup merge of #82297 - tmiasko:write-only, r=oli-obk
Consider auto derefs before warning about write only fields

Changes from #81473 extended the dead code lint with an ability to detect
fields that are written to but never read from. The implementation skips
over fields on the left hand side of an assignment, without marking them
as live.

A field access might involve an automatic dereference and de-facto read
the field. Conservatively mark expressions with deref adjustments as
live to avoid generating false positive warnings.

Closes #81626.
2021-02-23 16:10:25 +01:00
..
liveness Move RWUTable to a separate module 2020-12-09 00:00:00 +00:00
check_attr.rs Only store a LocalDefId in hir::MacroDef. 2021-02-15 19:35:55 +01:00
check_const.rs remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() 2021-02-21 18:11:27 +01:00
dead.rs Consider auto derefs before warning about write only fields 2021-02-19 00:00:00 +00:00
diagnostic_items.rs Use less HirId when referring to items. 2021-02-15 19:36:12 +01:00
entry.rs Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
hir_id_validator.rs Index Modules using their LocalDefId. 2021-02-15 19:32:30 +01:00
hir_stats.rs Rollup merge of #82258 - tmiasko:foreign-hir-stats, r=davidtwco 2021-02-23 16:10:22 +01:00
intrinsicck.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
lang_items.rs Only store a LocalDefId in hir::ImplItem. 2021-02-15 19:32:29 +01:00
layout_test.rs Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
lib.rs Validate use of parameters in naked functions 2020-11-25 00:00:00 +00:00
lib_features.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
liveness.rs Add loop head span to hir 2021-01-21 21:41:46 -08:00
loops.rs Do not suggest using a break label when one is already present 2021-01-21 21:43:29 -08:00
naked_functions.rs Reintroduce hir::ExprKind::If 2021-01-07 18:54:12 -03:00
reachable.rs Only store a LocalDefId in hir::ImplItem. 2021-02-15 19:32:29 +01:00
region.rs Rename HIR UnOp variants 2021-02-09 11:39:20 +03:00
stability.rs Only store a LocalDefId in hir::MacroDef. 2021-02-15 19:35:55 +01:00
upvars.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
weak_lang_items.rs This should address issue 81294. 2021-01-25 14:37:27 -05:00