about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-15 08:46:00 +0000
committerbors <bors@rust-lang.org>2020-12-15 08:46:00 +0000
commite99a89c7c0b6865a680a2d6169847ec8acc001d3 (patch)
tree7924a9c9ef4585a7007f141e5994a9b0ceb00b49 /compiler/rustc_errors/src/snippet.rs
parente261649593cf9c2707f7b30a61c46c4469c67ebb (diff)
parent0b18ed833c4406d8fc654b9f4990d2f80dc205c4 (diff)
downloadrust-e99a89c7c0b6865a680a2d6169847ec8acc001d3.tar.gz
rust-e99a89c7c0b6865a680a2d6169847ec8acc001d3.zip
Auto merge of #73210 - wesleywiser:consts_in_debuginfo, r=oli-obk
[mir-opt] Allow debuginfo to be generated for a constant or a Place

Prior to this commit, debuginfo was always generated by mapping a name
to a Place. This has the side-effect that `SimplifyLocals` cannot remove
locals that are only used for debuginfo because their other uses have
been const-propagated.

To allow these locals to be removed, we now allow debuginfo to point to
a constant value. The `ConstProp` pass detects when debuginfo points to
a local with a known constant value and replaces it with the value. This
allows the later `SimplifyLocals` pass to remove the local.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions