File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
compiler/rustc_errors/src Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ impl StringPart {
216216impl Diagnostic {
217217 #[ track_caller]
218218 pub fn new < M : Into < DiagnosticMessage > > ( level : Level , message : M ) -> Self {
219- Diagnostic :: new_with_code ( level, None , message )
219+ Diagnostic :: new_with_messages ( level, vec ! [ ( message . into ( ) , Style :: NoStyle ) ] )
220220 }
221221
222222 #[ track_caller]
@@ -235,26 +235,6 @@ impl Diagnostic {
235235 }
236236 }
237237
238- #[ track_caller]
239- pub ( crate ) fn new_with_code < M : Into < DiagnosticMessage > > (
240- level : Level ,
241- code : Option < DiagnosticId > ,
242- message : M ,
243- ) -> Self {
244- Diagnostic {
245- level,
246- message : vec ! [ ( message. into( ) , Style :: NoStyle ) ] ,
247- code,
248- span : MultiSpan :: new ( ) ,
249- children : vec ! [ ] ,
250- suggestions : Ok ( vec ! [ ] ) ,
251- args : Default :: default ( ) ,
252- sort_span : DUMMY_SP ,
253- is_lint : false ,
254- emitted_at : DiagnosticLocation :: caller ( ) ,
255- }
256- }
257-
258238 #[ inline( always) ]
259239 pub fn level ( & self ) -> Level {
260240 self . level
You can’t perform that action at this time.
0 commit comments