diff options
| author | Wesley Wiser <wwiser@gmail.com> | 2020-05-30 15:02:32 -0400 |
|---|---|---|
| committer | Wesley Wiser <wwiser@gmail.com> | 2020-12-06 20:48:25 -0500 |
| commit | 01aec8d18556be5e8d498c2f331b9015b7befde2 (patch) | |
| tree | 319bf10bc8a93fda56f200deedadf76c7a534b8e /src/test/incremental | |
| parent | b776d1c3e3db8befabb123ebb1e46c3531eaed46 (diff) | |
| download | rust-01aec8d18556be5e8d498c2f331b9015b7befde2.tar.gz rust-01aec8d18556be5e8d498c2f331b9015b7befde2.zip | |
[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 'src/test/incremental')
| -rw-r--r-- | src/test/incremental/hashes/let_expressions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/incremental/hashes/let_expressions.rs b/src/test/incremental/hashes/let_expressions.rs index 918e72582d6..2c37b2e78ff 100644 --- a/src/test/incremental/hashes/let_expressions.rs +++ b/src/test/incremental/hashes/let_expressions.rs @@ -86,7 +86,7 @@ pub fn change_mutability_of_slot() { #[cfg(not(cfail1))] #[rustc_clean(cfg="cfail2", - except="hir_owner_nodes,typeck,optimized_mir")] + except="hir_owner_nodes,typeck")] #[rustc_clean(cfg="cfail3")] pub fn change_mutability_of_slot() { let _x: u64 = 0; @@ -166,7 +166,7 @@ pub fn change_mutability_of_binding_in_pattern() { #[cfg(not(cfail1))] #[rustc_clean(cfg="cfail2", - except="hir_owner_nodes,typeck,optimized_mir")] + except="hir_owner_nodes,typeck")] #[rustc_clean(cfg="cfail3")] pub fn change_mutability_of_binding_in_pattern() { let (mut _a, _b) = (99u8, 'q'); |
