]> git.lizzy.rs Git - rust.git/blob - tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-1.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / debuginfo / debuginfo-type-name-layout-ice-94961-1.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. See https://github.com/rust-lang/rust/issues/94961.
3
4 // compile-flags:-C debuginfo=2
5 // build-fail
6 // error-pattern: too big for the current architecture
7 // normalize-stderr-64bit "18446744073709551615" -> "SIZE"
8 // normalize-stderr-32bit "4294967295" -> "SIZE"
9
10 #![crate_type = "rlib"]
11
12 pub struct Foo<T>([T; usize::MAX]);
13
14 pub fn foo() -> usize {
15     std::mem::size_of::<Foo<u8>>()
16 }