diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-06-23 13:10:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-23 13:10:07 -0700 |
| commit | 505cf52c537c0d64ecf72e12e9853e8693b30406 (patch) | |
| tree | 4fb2bd3f5ca240249ce799feb31c88eecb852a42 /src/librustc_session | |
| parent | f5e46fe46c2931fa6c0eea78d7fb424ab01606fc (diff) | |
| parent | 95f8daa82b52e95081b66d58953c2329a9f0458e (diff) | |
Rollup merge of #73523 - jyn514:everybody_loops, r=ecstatic-morse
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 f77bf5ddefd..c5a866817cb 100644 --- a/src/librustc_session/config.rs +++ b/src/librustc_session/config.rs @@ -1849,6 +1849,7 @@ fn parse_pretty( } } }; + log::debug!("got unpretty option: {:?}", first); first } } @@ -1977,9 +1978,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 |
