Rollup merge of #107076 - megakorre:106419_add_test_case, r=compiler-errors

Added const-generic ui test case for issue #106419

This PR adds a test case for #106419 which has been fixed in master by #105292

I also ran the test on f769d34291 (the commit before #105292 was merged)
and it did fail there with the following output.
```
--- stderr -------------------------------
error[E0308]: mismatched types
  --> /home/patrikk/src/rust/src/test/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs:5:10
   |
LL | #[derive(Clone)]
   |          ^^^^^
   |          |
   |          expected `A`, found `B`
   |          expected `Bar<A, B>` because of return type
   |
   = note: expected struct `Bar<A, _>`
              found struct `Bar<B, _>`
   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
------------------------------------------
```
This commit is contained in:
Matthias Krüger 2023-01-20 07:16:11 +01:00 committed by GitHub
commit 75655a9246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,12 @@
// check-pass
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
#[derive(Clone)]
struct Bar<const A: usize, const B: usize>
where
[(); A as usize]:,
[(); B as usize]:,
{}
fn main() {}