mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
16 lines
309 B
Rust
16 lines
309 B
Rust
//! This checks that compiler correctly evaluate constant array lengths within trait `impl` headers.
|
|
//!
|
|
//! Regression test for <https://github.com/rust-lang/rust/issues/49208>.
|
|
|
|
trait Foo {
|
|
fn foo();
|
|
}
|
|
|
|
impl Foo for [(); 1] {
|
|
fn foo() {}
|
|
}
|
|
|
|
fn main() {
|
|
<[(); 0] as Foo>::foo() //~ ERROR E0277
|
|
}
|