diff options
| author | Jonathan Turner <jturner@mozilla.com> | 2016-05-12 16:39:09 -0700 |
|---|---|---|
| committer | Jonathan Turner <jturner@mozilla.com> | 2016-05-12 16:48:59 -0700 |
| commit | 1b6afd1e42ba2a809c2b7255ed61784d9901555e (patch) | |
| tree | aa613d7f87ce2342eae9188f13d9222c28c1c6cf /src/libsyntax/errors | |
| parent | 104fe1c4db24f860b890dfd25577f23ee111279a (diff) | |
| download | rust-1b6afd1e42ba2a809c2b7255ed61784d9901555e.tar.gz rust-1b6afd1e42ba2a809c2b7255ed61784d9901555e.zip | |
Update errors to use new error format
Diffstat (limited to 'src/libsyntax/errors')
| -rw-r--r-- | src/libsyntax/errors/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/errors/mod.rs b/src/libsyntax/errors/mod.rs index 04f540c81ae..7592214c0ab 100644 --- a/src/libsyntax/errors/mod.rs +++ b/src/libsyntax/errors/mod.rs @@ -235,17 +235,17 @@ impl<'a> DiagnosticBuilder<'a> { /// all, and you just supplied a `Span` to create the diagnostic, /// then the snippet will just include that `Span`, which is /// called the primary span. - pub fn span_label(mut self, span: Span, label: &fmt::Display) - -> DiagnosticBuilder<'a> { + pub fn span_label(&mut self, span: Span, label: &fmt::Display) + -> &mut DiagnosticBuilder<'a> { self.span.push_span_label(span, format!("{}", label)); self } - pub fn note_expected_found(mut self, + pub fn note_expected_found(&mut self, label: &fmt::Display, expected: &fmt::Display, found: &fmt::Display) - -> DiagnosticBuilder<'a> + -> &mut DiagnosticBuilder<'a> { // For now, just attach these as notes self.note(&format!("expected {} `{}`", label, expected)); |
