summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0747.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0747.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0747.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0747.md b/compiler/rustc_error_codes/src/error_codes/E0747.md
new file mode 100644
index 000000000..caf7e0fba
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0747.md
@@ -0,0 +1,20 @@
+Generic arguments were not provided in the same order as the corresponding
+generic parameters are declared.
+
+Erroneous code example:
+
+```compile_fail,E0747
+struct S<'a, T>(&'a T);
+
+type X = S<(), 'static>; // error: the type argument is provided before the
+ // lifetime argument
+```
+
+The argument order should be changed to match the parameter declaration
+order, as in the following:
+
+```
+struct S<'a, T>(&'a T);
+
+type X = S<'static, ()>; // ok
+```