Skip to content

Commit 75655a9

Browse files
authored
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 f769d34 (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`. ------------------------------------------ ```
2 parents 66a9006 + 8657cb8 commit 75655a9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// check-pass
2+
#![feature(generic_const_exprs)]
3+
#![allow(incomplete_features)]
4+
5+
#[derive(Clone)]
6+
struct Bar<const A: usize, const B: usize>
7+
where
8+
[(); A as usize]:,
9+
[(); B as usize]:,
10+
{}
11+
12+
fn main() {}

0 commit comments

Comments
 (0)