blob: 6001d8247876a0f58cd60f0e031521c797ea99c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
error[E0107]: function takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/issue_114151.rs:17:5
|
LL | foo::<_, L>([(); L + 1 + L]);
| ^^^ - help: remove this generic argument
| |
| expected 1 generic argument
|
note: function defined here, with 1 generic parameter: `N`
--> $DIR/issue_114151.rs:4:4
|
LL | fn foo<const N: usize>(
| ^^^ --------------
error[E0308]: mismatched types
--> $DIR/issue_114151.rs:17:18
|
LL | foo::<_, L>([(); L + 1 + L]);
| ^^ expected `u8`, found `()`
error: unconstrained generic constant
--> $DIR/issue_114151.rs:17:22
|
LL | foo::<_, L>([(); L + 1 + L]);
| ^^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); L + 1 + L]:`
error: unconstrained generic constant
--> $DIR/issue_114151.rs:17:17
|
LL | foo::<_, L>([(); L + 1 + L]);
| ----------- ^^^^^^^^^^^^^^^
| |
| required by a bound introduced by this call
|
= help: try adding a `where` bound using this expression: `where [(); {
{
N
}
}]:`
note: required by a bound in `foo`
--> $DIR/issue_114151.rs:5:13
|
LL | fn foo<const N: usize>(
| --- required by a bound in this function
LL | _: [u8; {
| _____________^
LL | | {
LL | | N
LL | | }
LL | | }],
| |_____^ required by this bound in `foo`
error: unconstrained generic constant `{const expr}`
--> $DIR/issue_114151.rs:17:5
|
LL | foo::<_, L>([(); L + 1 + L]);
| ^^^^^^^^^^^
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0107, E0308.
For more information about an error, try `rustc --explain E0107`.
|