]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-no-fn-3.stderr
Rollup merge of #61273 - RalfJung:maybe-uninit, r=Centril
[rust.git] / src / test / ui / closures / closure-no-fn-3.stderr
1 error[E0605]: non-primitive cast: `[closure@$DIR/closure-no-fn-3.rs:6:27: 6:37 b:_]` as `fn() -> u8`
2   --> $DIR/closure-no-fn-3.rs:6:27
3    |
4 LL |     let baz: fn() -> u8 = (|| { b }) as fn() -> u8;
5    |                           ^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0605`.