diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2017-10-27 08:21:22 +0200 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2017-11-02 10:19:41 +0100 |
| commit | 6ae440e04806ef2a9d21df4ee6f9e0006db5b05f (patch) | |
| tree | 9e32f9822b288a844c88833d0e1b1d8294def353 /src/librustc_errors/diagnostic_builder.rs | |
| parent | 88fb4c4fdad1b97c3499a26e24dcbc60c6853a80 (diff) | |
| download | rust-6ae440e04806ef2a9d21df4ee6f9e0006db5b05f.tar.gz rust-6ae440e04806ef2a9d21df4ee6f9e0006db5b05f.zip | |
Make the difference between lint codes and error codes explicit
Diffstat (limited to 'src/librustc_errors/diagnostic_builder.rs')
| -rw-r--r-- | src/librustc_errors/diagnostic_builder.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs index 2cd433bfe3a..40b5810454b 100644 --- a/src/librustc_errors/diagnostic_builder.rs +++ b/src/librustc_errors/diagnostic_builder.rs @@ -9,6 +9,7 @@ // except according to those terms. use Diagnostic; +use DiagnosticId; use DiagnosticStyledString; use Level; @@ -192,7 +193,7 @@ impl<'a> DiagnosticBuilder<'a> { suggestions: Vec<String>) -> &mut Self); forward!(pub fn set_span<S: Into<MultiSpan>>(&mut self, sp: S) -> &mut Self); - forward!(pub fn code(&mut self, s: String) -> &mut Self); + forward!(pub fn code(&mut self, s: DiagnosticId) -> &mut Self); /// Convenience function for internal use, clients should use one of the /// struct_* methods on Handler. @@ -204,7 +205,7 @@ impl<'a> DiagnosticBuilder<'a> { /// struct_* methods on Handler. pub fn new_with_code(handler: &'a Handler, level: Level, - code: Option<String>, + code: Option<DiagnosticId>, message: &str) -> DiagnosticBuilder<'a> { let diagnostic = Diagnostic::new_with_code(level, code, message); |
