Skip to content

Commit 9d9c8c6

Browse files
authored
Rollup merge of #68312 - varkor:issue-67753-regression, r=Centril
Add regression test for integer literals in generic arguments in where clauses Closes #67753.
2 parents 87293cd + a91f77c commit 9d9c8c6

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
3+
#![feature(const_generics)]
4+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5+
6+
fn takes_closure_of_array_3<F>(f: F) where F: Fn([i32; 3]) {
7+
f([1, 2, 3]);
8+
}
9+
10+
fn takes_closure_of_array_3_apit(f: impl Fn([i32; 3])) {
11+
f([1, 2, 3]);
12+
}
13+
14+
fn returns_closure_of_array_3() -> impl Fn([i32; 3]) {
15+
|_| {}
16+
}
17+
18+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/integer-literal-generic-arg-in-where-clause.rs:3:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+

0 commit comments

Comments
 (0)