]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-no-fn-3.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / closures / closure-no-fn-3.stderr
1 error[E0605]: non-primitive cast: `[closure@$DIR/closure-no-fn-3.rs:16:27: 16:37 b:_]` as `fn() -> u8`
2   --> $DIR/closure-no-fn-3.rs:16: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`.