Closed
Description
Given a file
trait Foo {
fn bar(&self);
}
pub struct FooConstForMethod;
impl Foo for FooConstForMethod {
const bar: u64 = 1;
}
produces output
error[E0323]: item `bar` is an associated const, which doesn't match its trait `<FooConstForMethod as Foo>`
--> $DIR/impl-wrong-item-for-trait.rs
|
XX | const bar: u64 = 1;
| ^^^^^^^^^^^^^^^^^^^ does not match trait
as per this review from @nikomatsakis, it would make sense to change it so that the output is (at least in this case):
error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo`
Metadata
Metadata
Assignees
Labels
No labels