]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0747.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0747.md
1 Generic arguments were not provided in the same order as the corresponding
2 generic parameters are declared.
3
4 Erroneous code example:
5
6 ```compile_fail,E0747
7 struct S<'a, T>(&'a T);
8
9 type X = S<(), 'static>; // error: the type argument is provided before the
10                          // lifetime argument
11 ```
12
13 The argument order should be changed to match the parameter declaration
14 order, as in the following:
15
16 ```
17 struct S<'a, T>(&'a T);
18
19 type X = S<'static, ()>; // ok
20 ```