Skip to content

Commit 4111a46

Browse files
committed
Add large bitfield derive test and fix missing limit
1 parent 95879dd commit 4111a46

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

src/ir/analysis/derive_copy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use ir::derive::CanTriviallyDeriveCopy;
99
use ir::item::IsOpaque;
1010
use ir::template::TemplateParameters;
1111
use ir::traversal::EdgeKind;
12+
use ir::ty::RUST_DERIVE_IN_ARRAY_LIMIT;
1213
use ir::ty::TypeKind;
1314
use std::collections::HashMap;
1415
use std::collections::HashSet;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* automatically generated by rust-bindgen */
2+
3+
4+
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
5+
6+
7+
#[repr(C)]
8+
pub struct _bindgen_ty_1 {
9+
pub _bitfield_1: [u8; 128usize],
10+
pub __bindgen_align: [u64; 0usize],
11+
}
12+
impl Default for _bindgen_ty_1 {
13+
fn default() -> Self {
14+
unsafe { ::std::mem::zeroed() }
15+
}
16+
}
17+
extern "C" {
18+
#[link_name = "a"]
19+
pub static mut a: _bindgen_ty_1;
20+
}
21+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// bindgen-flags: --no-layout-tests
2+
3+
struct {
4+
unsigned : 632;
5+
} a;

0 commit comments

Comments
 (0)