You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: generic `Self` types are currently not permitted in anonymous constants
--> src/main.rs:15:27
|
15 | pub id: ArrayString<{ Self::FIX_ID_MAX_LEN }>,
| ^^^^
|
note: not a concrete type
Without #[derive(Deserialize)] it compiled and work just fine.
use arrayvec::ArrayString;use serde::Deserialize;#[derive(Deserialize)]pubstructFoo{pubid:ArrayString<{Self::FIX_ID_MAX_LEN}>,}implFoo{pubconstFIX_ID_MAX_LEN:usize = 20;}
Code bellow cause compilation error:
Without
#[derive(Deserialize)]
it compiled and work just fine.serde 1.0.210, rustc 1.82.0-beta.1, arrayvec 0.7.6
The text was updated successfully, but these errors were encountered: