1
Fork 0

Update error message for E0323, E0324 and E0325

This commit is contained in:
Vincent Prouillet 2016-08-05 16:27:40 +01:00
parent 271d048523
commit e0035c9797
2 changed files with 30 additions and 8 deletions

View file

@ -12,7 +12,9 @@
trait Foo {
fn bar(&self);
const MY_CONST: u32;
//~^ NOTE original trait requirement
//~| NOTE original trait requirement
const MY_CONST: u32; //~ NOTE original trait requirement
}
pub struct FooConstForMethod;
@ -21,6 +23,7 @@ impl Foo for FooConstForMethod {
//~^ ERROR E0046
const bar: u64 = 1;
//~^ ERROR E0323
//~| NOTE does not match trait
const MY_CONST: u32 = 1;
}
@ -31,6 +34,7 @@ impl Foo for FooMethodForConst {
fn bar(&self) {}
fn MY_CONST() {}
//~^ ERROR E0324
//~| NOTE does not match trait
}
pub struct FooTypeForMethod;
@ -39,6 +43,7 @@ impl Foo for FooTypeForMethod {
//~^ ERROR E0046
type bar = u64;
//~^ ERROR E0325
//~| NOTE does not match trait
const MY_CONST: u32 = 1;
}