diff options
| author | bors <bors@rust-lang.org> | 2020-12-15 08:46:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-15 08:46:00 +0000 |
| commit | e99a89c7c0b6865a680a2d6169847ec8acc001d3 (patch) | |
| tree | 7924a9c9ef4585a7007f141e5994a9b0ceb00b49 /compiler/rustc_errors/src/snippet.rs | |
| parent | e261649593cf9c2707f7b30a61c46c4469c67ebb (diff) | |
| parent | 0b18ed833c4406d8fc654b9f4990d2f80dc205c4 (diff) | |
| download | rust-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
