about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2018-11-07 13:40:55 +0100
committerDavid Wood <david@davidtw.co>2018-11-07 16:10:40 +0100
commit299a452a75883b64ea15fc7e7f0d139cab3d750f (patch)
treec428444594c122498472376bdf4a93a8150a3756 /src/rustllvm/RustWrapper.cpp
parent24e66c28980442a48d9458f1a4f9b76cc722dc8a (diff)
downloadrust-299a452a75883b64ea15fc7e7f0d139cab3d750f.tar.gz
rust-299a452a75883b64ea15fc7e7f0d139cab3d750f.zip
Ignore never-initialized locals for `unused_mut`.
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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions