blob: bc522e9cf4085cb6eac5f359361a63caa5feddf3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
An implementation of a trait doesn't match the type constraint.
Erroneous code example:
```compile_fail,E0326
trait Foo {
const BAR: bool;
}
struct Bar;
impl Foo for Bar {
const BAR: u32 = 5; // error, expected bool, found u32
}
```
The types of any associated constants in a trait implementation must match the
types in the trait definition.
|