]> git.lizzy.rs Git - rust.git/blob - src/test/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs
Add 'compiler/rustc_smir/' from commit '9abcb5c7b574cf316eb23d3f469187bb86ba3019'
[rust.git] / src / test / ui / debuginfo / debuginfo-type-name-layout-ice-94961-2.rs
1 // Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
2 // causes a layout error.
3 // This version of the test already ICE'd before the commit that introduce the ICE described in
4 // https://github.com/rust-lang/rust/issues/94961.
5
6 // compile-flags:-C debuginfo=2
7 // build-fail
8 // error-pattern: too big for the current architecture
9 // normalize-stderr-64bit "18446744073709551615" -> "SIZE"
10 // normalize-stderr-32bit "4294967295" -> "SIZE"
11
12 #![crate_type = "rlib"]
13
14 pub enum Foo<T> {
15     Bar([T; usize::MAX]),
16 }
17
18 pub fn foo() -> usize {
19     std::mem::size_of::<Foo<u8>>()
20 }