#162864·Rust

ICE 希望数组 pat 的长度是确定的

作者: matthiaskrgr创建于 2026年9月16日更新于 2026年9月17日
标签I-ICEC-bugneeds-triageF-min_generic_const_args

error[E0425]: cannot find value N in this scope --> /home/matthias/.rustup/toolchains/master/bin/rustc | 5 | struct Data([u8; N]); | ^ not found in this scope | help: you might be missing a const parameter | 5 | struct Data<const N: /* Type */>([u8; N]); | +++++++++++++++++++++ error[E0425]: cannot find value N in this scope --> /home/matthias/.rustup/toolchains/master/bin/rustc | 5 | struct Data([u8; N]); | ^ not found in this scope | help: you might be missing a const parameter | 5 | struct Data<const N: /* Type */>([u8; N]); | +++++++++++++++++++++ warning: the feature min_generic_const_args is incomplete and may not be safe to use and/or cause compiler crashes --> /home/matthias/.rustup/toolchains/master/bin/rustc | 1 | #![feature(min_generic_const_args)] | ^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #132980 https://GitHub.com/Rust-lang/Rust/issues/132980 for more information = note: #[warn(incomplete_features)] on by default warning: the feature macroless_const_item_generic_const_args is incomplete and may not be safe to use and/or cause compiler crashes --> /home/matthias/.rustup/toolchains/master/bin/rustc | 2 | …