Skip to content

Commit 1d29966

Browse files
committed
wrap error code in DiagnosticId::Error so it compiles
1 parent 0d739b5 commit 1d29966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_typeck/check/wfcheck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use rustc::middle::lang_items;
2222
use syntax::ast;
2323
use syntax::feature_gate::{self, GateIssue};
2424
use syntax_pos::Span;
25-
use errors::DiagnosticBuilder;
25+
use errors::{DiagnosticBuilder, DiagnosticId};
2626

2727
use rustc::hir::intravisit::{self, Visitor, NestedVisitorMap};
2828
use rustc::hir;
@@ -489,7 +489,7 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {
489489
fcx.tcx.sess.diagnostic().mut_span_err(span, &format!("invalid `self` type: {:?}", self_arg_ty))
490490
.note(&format!("type must be `{:?}` or a type that dereferences to it`", self_ty))
491491
.help("consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`")
492-
.code("E0307".into())
492+
.code(DiagnosticId::Error("E0307".into()))
493493
.emit();
494494
break
495495
}

0 commit comments

Comments
 (0)