diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-06-12 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-06-12 18:28:17 +0200 |
| commit | 06ca736e14da34739ff2fb6c02a8a475d7b0159d (patch) | |
| tree | 770182e2cccc33f675efc4550ca8593b9b21486d /compiler | |
| parent | 60f1a2fc4b535ead9c85ce085fdce49b1b097531 (diff) | |
| download | rust-06ca736e14da34739ff2fb6c02a8a475d7b0159d.tar.gz rust-06ca736e14da34739ff2fb6c02a8a475d7b0159d.zip | |
Pretty print generator witness only in `-Zverbose` mode
In release build of deeply-nested-async benchmark the size of `no-opt.bc` file is reduced from 46MB to 62kB.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 25557bdd100..69e3b8c76c8 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -685,10 +685,10 @@ pub trait PrettyPrinter<'tcx>: self = self.comma_sep(substs.as_generator().upvar_tys())?; } p!(")"); - } - if substs.as_generator().is_valid() { - p!(" ", print(substs.as_generator().witness())); + if substs.as_generator().is_valid() { + p!(" ", print(substs.as_generator().witness())); + } } p!("]") |
