Update E0391 to new format.
This commit is contained in:
parent
802d0811a5
commit
a6ffa42f7d
3 changed files with 3 additions and 0 deletions
|
@ -184,6 +184,7 @@ impl<'a,'tcx> CrateCtxt<'a,'tcx> {
|
|||
|
||||
let mut err = struct_span_err!(tcx.sess, span, E0391,
|
||||
"unsupported cyclic reference between types/traits detected");
|
||||
err.span_label(span, &format!("cyclic reference"));
|
||||
|
||||
match cycle[0] {
|
||||
AstConvRequest::GetItemTypeScheme(def_id) |
|
||||
|
|
|
@ -18,6 +18,7 @@ struct S {
|
|||
}
|
||||
|
||||
impl Foo for S { //~ ERROR: `Foo` is not a trait
|
||||
//~| NOTE: not a trait
|
||||
//~| NOTE: type aliases cannot be used for traits
|
||||
fn bar() { }
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
trait I {}
|
||||
type K = I;
|
||||
impl K for isize {} //~ ERROR: `K` is not a trait
|
||||
//~| NOTE: not a trait
|
||||
//~| NOTE: aliases cannot be used for traits
|
||||
|
||||
use ImportError; //~ ERROR unresolved
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue