]> git.proxmox.com Git - rustc.git/blob - tests/ui/const-generics/generic_const_exprs/different-fn.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / const-generics / generic_const_exprs / different-fn.stderr
1 error[E0308]: mismatched types
2 --> $DIR/different-fn.rs:10:5
3 |
4 LL | [0; size_of::<Foo<T>>()]
5 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `size_of::<T>()`, found `size_of::<Foo<T>>()`
6 |
7 = note: expected constant `size_of::<T>()`
8 found constant `size_of::<Foo<T>>()`
9
10 error: unconstrained generic constant
11 --> $DIR/different-fn.rs:10:9
12 |
13 LL | [0; size_of::<Foo<T>>()]
14 | ^^^^^^^^^^^^^^^^^^^
15 |
16 = help: try adding a `where` bound using this expression: `where [(); size_of::<Foo<T>>()]:`
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0308`.