diff options
| author | bohan <bohan-zhang@foxmail.com> | 2023-08-08 14:20:22 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2023-08-08 14:48:17 +0800 |
| commit | 078b942fef1a8a699ae3a276d7d9695e46025f7e (patch) | |
| tree | 1fda13312acbe004b93869adf04d87196a04c5c2 /tests/ui/const-generics/lifetime-in-const-param.rs | |
| parent | 8e7fd551311d424e4e63fa45906a2a928fce96a7 (diff) | |
| download | rust-078b942fef1a8a699ae3a276d7d9695e46025f7e.tar.gz rust-078b942fef1a8a699ae3a276d7d9695e46025f7e.zip | |
fix: not insert missing lifetime for `ConstParamTy`
Diffstat (limited to 'tests/ui/const-generics/lifetime-in-const-param.rs')
| -rw-r--r-- | tests/ui/const-generics/lifetime-in-const-param.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/const-generics/lifetime-in-const-param.rs b/tests/ui/const-generics/lifetime-in-const-param.rs new file mode 100644 index 00000000000..be90dbb213e --- /dev/null +++ b/tests/ui/const-generics/lifetime-in-const-param.rs @@ -0,0 +1,9 @@ +// https://github.com/rust-lang/rust/issues/113462 + +struct S2<'b>(&'b ()); + +struct S<'a, const N: S2>(&'a ()); +//~^ ERROR missing lifetime specifier [E0106] +//~| ERROR `S2<'_>` is forbidden as the type of a const generic parameter + +fn main() {} |
