diff options
| author | bors <bors@rust-lang.org> | 2020-02-27 18:38:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-27 18:38:19 +0000 |
| commit | 6d69caba110c0c2fb90180df1cbc8be5033b91d4 (patch) | |
| tree | ea43727ec0e56f4eda523aa60ccc346bd085083c /src/librustc_error_codes/error_codes | |
| parent | 49c68bd53f90e375bfb3cbba8c1c67a9e0adb9c0 (diff) | |
| parent | bead79ebc6d0f605f42a0f8315ce9f5fe5764b99 (diff) | |
| download | rust-6d69caba110c0c2fb90180df1cbc8be5033b91d4.tar.gz rust-6d69caba110c0c2fb90180df1cbc8be5033b91d4.zip | |
Auto merge of #68434 - varkor:astconv-mismatch-error, r=nikomatsakis
Move generic arg/param validation to `create_substs_for_generic_args` to resolve various const generics issues This changes some diagnostics, but I think they're around as helpful as the previous ones, and occur infrequently regardless. Fixes https://github.com/rust-lang/rust/issues/68257. Fixes https://github.com/rust-lang/rust/issues/68398. r? @eddyb
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0747.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0747.md b/src/librustc_error_codes/error_codes/E0747.md new file mode 100644 index 00000000000..df1afbfef46 --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0747.md @@ -0,0 +1,20 @@ +Generic arguments must be 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 +``` |
