From: Mark Rousskov Date: Fri, 9 Nov 2018 01:15:10 +0000 (-0700) Subject: Rollup merge of #55758 - davidtwco:issue-55344, r=pnkfelix X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=7944075e0bce111587b764c80613623986e1096f;p=rust.git Rollup merge of #55758 - davidtwco:issue-55344, r=pnkfelix [regression - rust2018]: unused_mut lint false positives on nightly Fixes #55344. This commit filters out locals that have never been initialized for consideration in the `unused_mut` lint. This is intended to detect when the statement that would have initialized the local was removed as unreachable code. In these cases, we would not want to lint. This is the same behaviour as the AST borrow checker. This is achieved by taking advantage of an existing pass over the MIR for the `unused_mut` lint and creating a set of those locals that were never initialized. r? @pnkfelix --- 7944075e0bce111587b764c80613623986e1096f