summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/generic_const_exprs/unify-op-with-fn-call.stderr
blob: eb71ebb62ebbf5e5ebeb29d8d3951b02650f338e (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
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
   |
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);
   |

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0741`.