Update E0391 to new format.

This commit is contained in:
Ryan Scott 2016-08-05 16:54:37 +09:00
parent 802d0811a5
commit a6ffa42f7d
3 changed files with 3 additions and 0 deletions

View File

@ -184,6 +184,7 @@ impl<'a,'tcx> CrateCtxt<'a,'tcx> {
let mut err = struct_span_err!(tcx.sess, span, E0391, let mut err = struct_span_err!(tcx.sess, span, E0391,
"unsupported cyclic reference between types/traits detected"); "unsupported cyclic reference between types/traits detected");
err.span_label(span, &format!("cyclic reference"));
match cycle[0] { match cycle[0] {
AstConvRequest::GetItemTypeScheme(def_id) | AstConvRequest::GetItemTypeScheme(def_id) |

View File

@ -18,6 +18,7 @@ struct S {
} }
impl Foo for S { //~ ERROR: `Foo` is not a trait impl Foo for S { //~ ERROR: `Foo` is not a trait
//~| NOTE: not a trait
//~| NOTE: type aliases cannot be used for traits //~| NOTE: type aliases cannot be used for traits
fn bar() { } fn bar() { }
} }

View File

@ -11,6 +11,7 @@
trait I {} trait I {}
type K = I; type K = I;
impl K for isize {} //~ ERROR: `K` is not a trait impl K for isize {} //~ ERROR: `K` is not a trait
//~| NOTE: not a trait
//~| NOTE: aliases cannot be used for traits //~| NOTE: aliases cannot be used for traits
use ImportError; //~ ERROR unresolved use ImportError; //~ ERROR unresolved