diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-04-06 04:24:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-06 04:24:15 +0200 |
| commit | eea91c308f70d6715f973bdd0352723d672f3b1c (patch) | |
| tree | 3937c59dc679c2aac715c53734fc4d0606c3b9bc /src/librustc_errors | |
| parent | 83f8c02eb92b0dfc46ae27cb71421d7bbcd7f30f (diff) | |
| parent | 17a95232b35766a24d2575c7fa1ef52c9fbf97de (diff) | |
| download | rust-eea91c308f70d6715f973bdd0352723d672f3b1c.tar.gz rust-eea91c308f70d6715f973bdd0352723d672f3b1c.zip | |
Rollup merge of #70519 - estebank:constraints-before-args-spans, r=Centril
Tweak output of type params and constraints in the wrong order r? @Centril @varkor
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/diagnostic_builder.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs index fffae0bfd24..2dbd9f4e52f 100644 --- a/src/librustc_errors/diagnostic_builder.rs +++ b/src/librustc_errors/diagnostic_builder.rs @@ -315,6 +315,20 @@ impl<'a> DiagnosticBuilder<'a> { self } + pub fn span_suggestion_verbose( + &mut self, + sp: Span, + msg: &str, + suggestion: String, + applicability: Applicability, + ) -> &mut Self { + if !self.0.allow_suggestions { + return self; + } + self.0.diagnostic.span_suggestion_verbose(sp, msg, suggestion, applicability); + self + } + pub fn span_suggestion_hidden( &mut self, sp: Span, |
