2023-08-06 08:20:55 -05:00
|
|
|
error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
|
|
|
|
--> $DIR/unify-op-with-fn-call.rs:18:29
|
2021-09-09 09:43:59 -05:00
|
|
|
|
|
2023-08-06 08:20:55 -05:00
|
|
|
LL | struct Evaluatable<const N: Foo>;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: add `#[derive(ConstParamTy)]` to the struct
|
|
|
|
|
|
|
|
|
LL + #[derive(ConstParamTy)]
|
|
|
|
LL | struct Foo(u8);
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
|
|
|
|
--> $DIR/unify-op-with-fn-call.rs:20:17
|
|
|
|
|
|
|
|
|
LL | fn foo<const N: Foo>(a: Evaluatable<{ N + N }>) {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: add `#[derive(ConstParamTy)]` to the struct
|
|
|
|
|
|
|
|
|
LL + #[derive(ConstParamTy)]
|
|
|
|
LL | struct Foo(u8);
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
|
|
|
|
--> $DIR/unify-op-with-fn-call.rs:24:17
|
|
|
|
|
|
|
|
|
LL | fn bar<const N: Foo>() {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: add `#[derive(ConstParamTy)]` to the struct
|
|
|
|
|
|
|
|
|
LL + #[derive(ConstParamTy)]
|
|
|
|
LL | struct Foo(u8);
|
2021-09-09 09:43:59 -05:00
|
|
|
|
|
|
|
|
|
2023-08-06 08:20:55 -05:00
|
|
|
error: aborting due to 3 previous errors
|
2021-09-09 09:43:59 -05:00
|
|
|
|
2023-08-06 08:20:55 -05:00
|
|
|
For more information about this error, try `rustc --explain E0741`.
|