fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB39 linesraw
1error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
2  --> $DIR/unify-op-with-fn-call.rs:18:29
3   |
4LL | struct Evaluatable<const N: Foo>;
5   |                             ^^^
6   |
7help: add `#[derive(ConstParamTy)]` to the struct
8   |
9LL + #[derive(ConstParamTy)]
10LL | struct Foo(u8);
11   |
12
13error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
14  --> $DIR/unify-op-with-fn-call.rs:20:17
15   |
16LL | fn foo<const N: Foo>(a: Evaluatable<{ N + N }>) {
17   |                 ^^^
18   |
19help: add `#[derive(ConstParamTy)]` to the struct
20   |
21LL + #[derive(ConstParamTy)]
22LL | struct Foo(u8);
23   |
24
25error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter
26  --> $DIR/unify-op-with-fn-call.rs:24:17
27   |
28LL | fn bar<const N: Foo>() {}
29   |                 ^^^
30   |
31help: add `#[derive(ConstParamTy)]` to the struct
32   |
33LL + #[derive(ConstParamTy)]
34LL | struct Foo(u8);
35   |
36
37error: aborting due to 3 previous errors
38
39For more information about this error, try `rustc --explain E0741`.