+ pub fn struct_span_warn<'a>(&'a self,
+ sp: Span,
+ msg: &str)
+ -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_span_warn(sp, msg)
+ }
+ pub fn struct_span_warn_with_code<'a>(&'a self,
+ sp: Span,
+ msg: &str,
+ code: &str)
+ -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_span_warn_with_code(sp, msg, code)
+ }
+ pub fn struct_warn<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_warn(msg)
+ }
+ pub fn struct_span_err<'a>(&'a self,
+ sp: Span,
+ msg: &str)
+ -> DiagnosticBuilder<'a> {
+ match split_msg_into_multilines(msg) {
+ Some(ref msg) => self.diagnostic().struct_span_err(sp, msg),
+ None => self.diagnostic().struct_span_err(sp, msg),
+ }
+ }
+ pub fn struct_span_err_with_code<'a>(&'a self,
+ sp: Span,
+ msg: &str,
+ code: &str)
+ -> DiagnosticBuilder<'a> {
+ match split_msg_into_multilines(msg) {
+ Some(ref msg) => self.diagnostic().struct_span_err_with_code(sp, msg, code),
+ None => self.diagnostic().struct_span_err_with_code(sp, msg, code),
+ }
+ }
+ pub fn struct_err<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_err(msg)
+ }
+ pub fn struct_span_fatal<'a>(&'a self,
+ sp: Span,
+ msg: &str)
+ -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_span_fatal(sp, msg)
+ }
+ pub fn struct_span_fatal_with_code<'a>(&'a self,
+ sp: Span,
+ msg: &str,
+ code: &str)
+ -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_span_fatal_with_code(sp, msg, code)
+ }
+ pub fn struct_fatal<'a>(&'a self, msg: &str) -> DiagnosticBuilder<'a> {
+ self.diagnostic().struct_fatal(msg)
+ }
+