mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 04:27:38 +00:00
15 lines
464 B
Plaintext
15 lines
464 B
Plaintext
![]() |
error: `~const` is not allowed here
|
||
|
--> $DIR/tilde-const-and-const-params.rs:25:11
|
||
|
|
|
||
|
LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
|
||
|
| ^^^^^^^^^^^^
|
||
|
|
|
||
|
note: this function is not `const`, so it cannot have `~const` trait bounds
|
||
|
--> $DIR/tilde-const-and-const-params.rs:25:4
|
||
|
|
|
||
|
LL | fn bar<A: ~const Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
|
||
|
| ^^^
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|