Files
rust/src/test/ui/const-generics/issues/issue-67375.rs

15 lines
463 B
Rust
Raw Normal View History

2020-10-03 17:00:18 +01:00
// revisions: full min
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, feature(const_generics))]
struct Bug<T> {
//~^ ERROR parameter `T` is never used
inner: [(); { [|_: &T| {}; 0].len() }],
2020-10-12 22:27:59 +01:00
//[min]~^ ERROR generic parameters may not be used in const operations
2020-10-03 17:00:18 +01:00
//[full]~^^ WARN cannot use constants which depend on generic parameters in types
//[full]~^^^ WARN this was previously accepted by the compiler
}
fn main() {}