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