Skip to content

Commit

Permalink
Auto merge of rust-lang#81462 - osa1:issue75158, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Feb 7, 2021
2 parents 0961ae8 + d6e209f commit 323fb71
Show file tree
Hide file tree
Showing 24 changed files with 20 additions and 0 deletions.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions src/test/ui/limits/issue-75158-64.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//~ ERROR

// build-fail
// ignore-32bit

struct S<T> {
x: [T; !0],
}

pub fn f() -> usize {
std::mem::size_of::<S<u8>>()
}

fn main() {
let x = f();
}
4 changes: 4 additions & 0 deletions src/test/ui/limits/issue-75158-64.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: values of the type `[u8; 18446744073709551615]` are too big for the current architecture

error: aborting due to previous error

0 comments on commit 323fb71

Please sign in to comment.