Update E0404 to new format.

This commit is contained in:
Ryan Scott 2016-08-05 16:59:44 +09:00
parent a6ffa42f7d
commit 19e140b946
2 changed files with 8 additions and 2 deletions

View File

@ -219,7 +219,13 @@ fn resolve_struct_error<'b, 'a: 'b, 'c>(resolver: &'b Resolver<'a>,
name)
}
ResolutionError::IsNotATrait(name) => {
struct_span_err!(resolver.session, span, E0404, "`{}` is not a trait", name)
let mut err = struct_span_err!(resolver.session,
span,
E0404,
"`{}` is not a trait",
name);
err.span_label(span, &format!("not a trait"));
err
}
ResolutionError::UndeclaredTraitName(name, candidates) => {
let mut err = struct_span_err!(resolver.session,

View File

@ -2,7 +2,7 @@ error[E0404]: `Bar` is not a trait
--> $DIR/two_files.rs:16:6
|
16 | impl Bar for Baz { }
| ^^^
| ^^^ not a trait
|
= note: type aliases cannot be used for traits