Erroneous E0367 on struct containing a closure returning an array #58311
Labels
A-type-system
Area: Type system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code fails in the playground, on the latest stable (1.32.0), latest beta (1.33.0-beta.6) and latest nightly (2019-02-07):
The error is the following:
The error seems to be the same regardless of rust version, and regardless of whether the function is an
Fn
, anFnMut
, or anFnOnce
(in particular, the error mentionsstd::ops::FnOnce<()>>::Output
even whenF
isn't anFnOnce
, if that's relevant).The error does not occur when the return type
[u8; 1]
is replaced with, for example,u8
or(u8, u8)
, but still occurs with a more complex type still containing an array such as(u8, [u8; 1], u8)
;Have a nice day.
The text was updated successfully, but these errors were encountered: