wrap error code in DiagnosticId::Error so it compiles
This commit is contained in:
parent
0d739b5b97
commit
1d29966d3b
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ use rustc::middle::lang_items;
|
|||
use syntax::ast;
|
||||
use syntax::feature_gate::{self, GateIssue};
|
||||
use syntax_pos::Span;
|
||||
use errors::DiagnosticBuilder;
|
||||
use errors::{DiagnosticBuilder, DiagnosticId};
|
||||
|
||||
use rustc::hir::intravisit::{self, Visitor, NestedVisitorMap};
|
||||
use rustc::hir;
|
||||
|
@ -489,7 +489,7 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {
|
|||
fcx.tcx.sess.diagnostic().mut_span_err(span, &format!("invalid `self` type: {:?}", self_arg_ty))
|
||||
.note(&format!("type must be `{:?}` or a type that dereferences to it`", self_ty))
|
||||
.help("consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`")
|
||||
.code("E0307".into())
|
||||
.code(DiagnosticId::Error("E0307".into()))
|
||||
.emit();
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue