diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-06-19 20:06:49 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-06-19 20:27:22 -0400 |
| commit | 95f8daa82b52e95081b66d58953c2329a9f0458e (patch) | |
| tree | 504a22bcab6531ff06508011c16d3865f0762500 /src/librustc_session | |
| parent | e8ff4bcbd02475cf487cd101bf32954dc63366d4 (diff) | |
Fix -Z unpretty=everybody_loops
It turns out that this has not been working for who knows how long.
Previously:
```
pub fn h() { 1 + 2; }
```
After this change:
```
pub fn h() { loop {} }
```
This only affected the pass when run with the command line
pretty-printing option, so rustdoc was still replacing bodies with
`loop {}`.
Diffstat (limited to 'src/librustc_session')
| -rw-r--r-- | src/librustc_session/config.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustc_session/config.rs b/src/librustc_session/config.rs index 411a6eecbba..ff94a43c4f1 100644 --- a/src/librustc_session/config.rs +++ b/src/librustc_session/config.rs @@ -1826,6 +1826,7 @@ fn parse_pretty( } } }; + log::debug!("got unpretty option: {:?}", first); first } } @@ -1954,9 +1955,11 @@ impl PpMode { use PpMode::*; use PpSourceMode::*; match *self { - PpmSource(PpmNormal | PpmEveryBodyLoops | PpmIdentified) => false, + PpmSource(PpmNormal | PpmIdentified) => false, - PpmSource(PpmExpanded | PpmExpandedIdentified | PpmExpandedHygiene) + PpmSource( + PpmExpanded | PpmEveryBodyLoops | PpmExpandedIdentified | PpmExpandedHygiene, + ) | PpmHir(_) | PpmHirTree(_) | PpmMir |
