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
if mmap_size asusize < std::mem::size_of::<run>(){
...}
This code has a precedence issue: as binds looser than <, so I think this attempts to parse what comes after the as as a type, usize<std::mem::size_of ..., parsing the < as a generic. That results in the following error message:
error: expected identifier, found `<`
--> src/main.rs:202:48
|
202 | if mmap_size as usize < std::mem::size_of::<run>() {
| ^
This leads the user down the wrong path. Ideally, rustc should provide an error that hints at the precedence issue instead.