]>
Commit | Line | Data |
---|---|---|
60c5eb7d XL |
1 | A `#[marker]` trait contained an associated item. |
2 | ||
f9f354fc XL |
3 | Erroneous code example: |
4 | ||
5 | ```compile_fail,E0714 | |
6 | #![feature(marker_trait_attr)] | |
7 | #![feature(associated_type_defaults)] | |
8 | ||
9 | #[marker] | |
10 | trait MarkerConst { | |
11 | const N: usize; // error! | |
12 | } | |
13 | ||
14 | fn main() {} | |
15 | ``` | |
16 | ||
60c5eb7d | 17 | The items of marker traits cannot be overridden, so there's no need to have them |
9c376795 | 18 | when they cannot be changed per-type anyway. If you wanted them for ergonomic |
60c5eb7d | 19 | reasons, consider making an extension trait instead. |