]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0109.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0109.md
1 You tried to provide a generic argument to a type which doesn't need it.
2
3 Erroneous code example:
4
5 ```compile_fail,E0109
6 type X = u32<i32>; // error: type arguments are not allowed for this type
7 type Y = bool<'static>; // error: lifetime parameters are not allowed on
8                         //        this type
9 ```
10
11 Check that you used the correct argument and that the definition is correct.
12
13 Example:
14
15 ```
16 type X = u32; // ok!
17 type Y = bool; // ok!
18 ```
19
20 Note that generic arguments for enum variant constructors go after the variant,
21 not after the enum. For example, you would write `Option::None::<u32>`,
22 rather than `Option::<u32>::None`.