我尝试了以下内容
struct mbuf
{
cacheline: *mut [u64], // great amount of rows follows below
// ..........
}
static mut arr: [mbuf; 32]; // Q1 my main aim
// something as before but using Vec; // Q2 also main aim
fn main() {
// let static mut arr: [mbuf; 32]; // Q3 also doesn't work
// static mut arr: [mbuf; 32]; // Q3 also doesn't work
}
Run Code Online (Sandbox Code Playgroud)
并得到错误
src/main.rs:74:29: 74:30 error: expected one of `+` or `=`, found `;`
src/main.rs:74 static …Run Code Online (Sandbox Code Playgroud)