blob: 0373274770de5ad7940cf2d0659810e25ed10fcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//! 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
}
|