Skip to content

Commit 323fb71

Browse files
committed
Auto merge of rust-lang#81462 - osa1:issue75158, r=Mark-Simulacrum
Add test for rust-lang#75158 This also shifts some type-size related tests into a new directory, so that we keep the number of files at the root down. Closes rust-lang#75158
2 parents 0961ae8 + d6e209f commit 323fb71

24 files changed

+20
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/test/ui/limits/issue-75158-64.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//~ ERROR
2+
3+
// build-fail
4+
// ignore-32bit
5+
6+
struct S<T> {
7+
x: [T; !0],
8+
}
9+
10+
pub fn f() -> usize {
11+
std::mem::size_of::<S<u8>>()
12+
}
13+
14+
fn main() {
15+
let x = f();
16+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: values of the type `[u8; 18446744073709551615]` are too big for the current architecture
2+
3+
error: aborting due to previous error
4+

0 commit comments

Comments
 (0)