diff options
| author | Michael Goulet <michael@errs.io> | 2022-10-23 17:21:43 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-10-23 17:21:43 +0000 |
| commit | c5df62041950b2279191804841a51077826df9a0 (patch) | |
| tree | ec1e91dfddcb51ad374a0cc336ecfe8cfa758da6 /compiler/rustc_middle/src | |
| parent | c0cda2b2781a7cd66cc5d6672e390edfdbf7fc64 (diff) | |
| download | rust-c5df62041950b2279191804841a51077826df9a0.tar.gz rust-c5df62041950b2279191804841a51077826df9a0.zip | |
Annotate static lifetimes too
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 2a229e04743..b1523068799 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -983,15 +983,9 @@ pub trait PrettyPrinter<'tcx>: write!(self, "Sized")?; } - if let [re] = lifetimes.as_slice() - && re.is_static() - { - // Don't print a single static lifetime - } else { - for re in lifetimes { - write!(self, " + ")?; - self = self.print_region(re)?; - } + for re in lifetimes { + write!(self, " + ")?; + self = self.print_region(re)?; } Ok(self) |
