Why does println! work only for arrays with a length less than 33?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In Rust, this works: fn main() { let a = [0; 32]; println!("{:?}", a); } but this doesn't: fn main() { let a = [0; 33]; println!("{:?}", a); } Compile error: error[E0277]: the trait bound `[{integer}; 33]: std::fmt::Debug` is not satisfied --> src/main.rs:3:22 | 3 | println!("{:?}", a); | ^ the trait `std::fmt::Debug` is not implemented for `[{integer}; 33]` | = note: `[{integer}; 33]` cannot be formatted using `:?`; if it is defined in your crate, add `#[derive(Debug)]` or manually implement it = note: required by `std::fmt::Debug::fmt` I