about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2018-11-08 18:15:10 -0700
committerGitHub <noreply@github.com>2018-11-08 18:15:10 -0700
commit7944075e0bce111587b764c80613623986e1096f (patch)
tree01776667c6b382bbbf72135a1872a1180e88bf97 /src/rustllvm/RustWrapper.cpp
parent660340e4aab52f13287cc8cb4a0cc2279ecc3647 (diff)
parent299a452a75883b64ea15fc7e7f0d139cab3d750f (diff)
downloadrust-7944075e0bce111587b764c80613623986e1096f.tar.gz
rust-7944075e0bce111587b764c80613623986e1096f.zip
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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions