@@ -158,14 +158,14 @@ impl Session {
158158 pub fn struct_span_warn < ' a , S : Into < MultiSpan > > ( & ' a self ,
159159 sp : S ,
160160 msg : & str )
161- -> DiagnosticBuilder < ' a > {
161+ -> DiagnosticBuilder < ' a > {
162162 self . diagnostic ( ) . struct_span_warn ( sp, msg)
163163 }
164164 pub fn struct_span_warn_with_code < ' a , S : Into < MultiSpan > > ( & ' a self ,
165165 sp : S ,
166166 msg : & str ,
167167 code : & str )
168- -> DiagnosticBuilder < ' a > {
168+ -> DiagnosticBuilder < ' a > {
169169 self . diagnostic ( ) . struct_span_warn_with_code ( sp, msg, code)
170170 }
171171 pub fn struct_warn < ' a > ( & ' a self , msg : & str ) -> DiagnosticBuilder < ' a > {
@@ -174,30 +174,34 @@ impl Session {
174174 pub fn struct_span_err < ' a , S : Into < MultiSpan > > ( & ' a self ,
175175 sp : S ,
176176 msg : & str )
177- -> DiagnosticBuilder < ' a > {
177+ -> DiagnosticBuilder < ' a > {
178178 self . diagnostic ( ) . struct_span_err ( sp, msg)
179179 }
180180 pub fn struct_span_err_with_code < ' a , S : Into < MultiSpan > > ( & ' a self ,
181181 sp : S ,
182182 msg : & str ,
183183 code : & str )
184- -> DiagnosticBuilder < ' a > {
184+ -> DiagnosticBuilder < ' a > {
185185 self . diagnostic ( ) . struct_span_err_with_code ( sp, msg, code)
186186 }
187- pub fn struct_err < ' a > ( & ' a self , msg : & str ) -> DiagnosticBuilder < ' a > {
187+ // FIXME: This method should be removed (every error should have an associated error code).
188+ pub fn struct_err < ' a > ( & ' a self , msg : & str ) -> DiagnosticBuilder < ' a > {
188189 self . diagnostic ( ) . struct_err ( msg)
189190 }
191+ pub fn struct_err_with_code < ' a > ( & ' a self , msg : & str , code : & str ) -> DiagnosticBuilder < ' a > {
192+ self . diagnostic ( ) . struct_err_with_code ( msg, code)
193+ }
190194 pub fn struct_span_fatal < ' a , S : Into < MultiSpan > > ( & ' a self ,
191195 sp : S ,
192196 msg : & str )
193- -> DiagnosticBuilder < ' a > {
197+ -> DiagnosticBuilder < ' a > {
194198 self . diagnostic ( ) . struct_span_fatal ( sp, msg)
195199 }
196200 pub fn struct_span_fatal_with_code < ' a , S : Into < MultiSpan > > ( & ' a self ,
197201 sp : S ,
198202 msg : & str ,
199203 code : & str )
200- -> DiagnosticBuilder < ' a > {
204+ -> DiagnosticBuilder < ' a > {
201205 self . diagnostic ( ) . struct_span_fatal_with_code ( sp, msg, code)
202206 }
203207 pub fn struct_fatal < ' a > ( & ' a self , msg : & str ) -> DiagnosticBuilder < ' a > {
0 commit comments