mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
23 lines
360 B
Rust
23 lines
360 B
Rust
//@ known-bug: #120793
|
|
// can't use build-fail, because this also fails check-fail, but
|
|
// the ICE from #120787 only reproduces on build-fail.
|
|
//@ compile-flags: --emit=mir
|
|
|
|
#![feature(effects)]
|
|
|
|
trait Dim {
|
|
fn dim() -> usize;
|
|
}
|
|
|
|
enum Dim3 {}
|
|
|
|
impl Dim for Dim3 {
|
|
fn dim(x: impl Sized) -> usize {
|
|
3
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
[0; Dim3::dim()];
|
|
}
|