Skip to content

Commit 4f4c5f9

Browse files
committed
libbpf-cargo: Fix broken tests for 3a9e1d5
1 parent 3a9e1d5 commit 4f4c5f9

File tree

1 file changed

+49
-49
lines changed

1 file changed

+49
-49
lines changed

libbpf-cargo/src/test.rs

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2514,24 +2514,24 @@ struct Foo foo;
25142514
#[repr(C)]
25152515
pub struct Foo {
25162516
pub x: i32,
2517-
pub bar: __anon_1,
2517+
pub bar: __anon_Foo_1,
25182518
pub __pad_36: [u8; 4],
2519-
pub baz: __anon_2,
2519+
pub baz: __anon_Foo_2,
25202520
pub w: i32,
25212521
pub __pad_52: [u8; 4],
25222522
}
25232523
#[derive(Copy, Clone)]
25242524
#[repr(C)]
2525-
pub union __anon_1 {
2525+
pub union __anon_Foo_1 {
25262526
pub y: [u8; 10],
25272527
pub z: [u16; 16],
25282528
}
2529-
impl std::fmt::Debug for __anon_1 {
2529+
impl std::fmt::Debug for __anon_Foo_1 {
25302530
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25312531
write!(f, "(???)")
25322532
}
25332533
}
2534-
impl Default for __anon_1 {
2534+
impl Default for __anon_Foo_1 {
25352535
fn default() -> Self {
25362536
Self {
25372537
y: [u8::default(); 10],
@@ -2540,16 +2540,16 @@ impl Default for __anon_1 {
25402540
}
25412541
#[derive(Copy, Clone)]
25422542
#[repr(C)]
2543-
pub union __anon_2 {
2543+
pub union __anon_Foo_2 {
25442544
pub w: u32,
25452545
pub u: *mut u64,
25462546
}
2547-
impl std::fmt::Debug for __anon_2 {
2547+
impl std::fmt::Debug for __anon_Foo_2 {
25482548
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25492549
write!(f, "(???)")
25502550
}
25512551
}
2552-
impl Default for __anon_2 {
2552+
impl Default for __anon_Foo_2 {
25532553
fn default() -> Self {
25542554
Self {
25552555
w: u32::default(),
@@ -2594,25 +2594,25 @@ struct Foo foo;
25942594
#[repr(C)]
25952595
pub struct Foo {
25962596
pub x: i32,
2597-
pub bar: __anon_1,
2598-
pub baz: __anon_2,
2597+
pub bar: __anon_Foo_1,
2598+
pub baz: __anon_Foo_2,
25992599
pub w: i32,
26002600
pub __pad_68: [u8; 4],
26012601
}
26022602
#[derive(Debug, Default, Copy, Clone)]
26032603
#[repr(C)]
2604-
pub struct __anon_1 {
2604+
pub struct __anon_Foo_1 {
26052605
pub y: [u8; 10],
26062606
pub z: [u16; 16],
26072607
}
26082608
#[derive(Debug, Copy, Clone)]
26092609
#[repr(C)]
2610-
pub struct __anon_2 {
2610+
pub struct __anon_Foo_2 {
26112611
pub w: u32,
26122612
pub __pad_4: [u8; 4],
26132613
pub u: *mut u64,
26142614
}
2615-
impl Default for __anon_2 {
2615+
impl Default for __anon_Foo_2 {
26162616
fn default() -> Self {
26172617
Self {
26182618
w: u32::default(),
@@ -2667,31 +2667,31 @@ struct Foo foo;
26672667
#[repr(C)]
26682668
pub struct Foo {
26692669
pub x: i32,
2670-
pub bar: __anon_1,
2671-
pub zerg: __anon_2,
2672-
pub baz: __anon_3,
2670+
pub bar: __anon_Foo_1,
2671+
pub zerg: __anon_Foo_2,
2672+
pub baz: __anon_Foo_3,
26732673
pub w: i32,
26742674
pub __pad_76: [u8; 4],
2675-
pub flarg: __anon_4,
2675+
pub flarg: __anon_Foo_4,
26762676
}
26772677
#[derive(Debug, Default, Copy, Clone)]
26782678
#[repr(C)]
2679-
pub struct __anon_1 {
2679+
pub struct __anon_Foo_1 {
26802680
pub y: [u8; 10],
26812681
pub z: [u16; 16],
26822682
}
26832683
#[derive(Copy, Clone)]
26842684
#[repr(C)]
2685-
pub union __anon_2 {
2685+
pub union __anon_Foo_2 {
26862686
pub a: *mut i8,
26872687
pub b: i32,
26882688
}
2689-
impl std::fmt::Debug for __anon_2 {
2689+
impl std::fmt::Debug for __anon_Foo_2 {
26902690
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26912691
write!(f, "(???)")
26922692
}
26932693
}
2694-
impl Default for __anon_2 {
2694+
impl Default for __anon_Foo_2 {
26952695
fn default() -> Self {
26962696
Self {
26972697
a: std::ptr::null_mut(),
@@ -2700,12 +2700,12 @@ impl Default for __anon_2 {
27002700
}
27012701
#[derive(Debug, Copy, Clone)]
27022702
#[repr(C)]
2703-
pub struct __anon_3 {
2703+
pub struct __anon_Foo_3 {
27042704
pub w: u32,
27052705
pub __pad_4: [u8; 4],
27062706
pub u: *mut u64,
27072707
}
2708-
impl Default for __anon_3 {
2708+
impl Default for __anon_Foo_3 {
27092709
fn default() -> Self {
27102710
Self {
27112711
w: u32::default(),
@@ -2716,16 +2716,16 @@ impl Default for __anon_3 {
27162716
}
27172717
#[derive(Copy, Clone)]
27182718
#[repr(C)]
2719-
pub union __anon_4 {
2719+
pub union __anon_Foo_4 {
27202720
pub c: u8,
27212721
pub d: [u64; 5],
27222722
}
2723-
impl std::fmt::Debug for __anon_4 {
2723+
impl std::fmt::Debug for __anon_Foo_4 {
27242724
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27252725
write!(f, "(???)")
27262726
}
27272727
}
2728-
impl Default for __anon_4 {
2728+
impl Default for __anon_Foo_4 {
27292729
fn default() -> Self {
27302730
Self {
27312731
c: u8::default(),
@@ -2763,20 +2763,20 @@ struct Foo foo = {{0}};
27632763
#[derive(Debug, Default, Copy, Clone)]
27642764
#[repr(C)]
27652765
pub struct Foo {
2766-
pub __anon_1: __anon_1,
2766+
pub __anon_Foo_1: __anon_Foo_1,
27672767
}
27682768
#[derive(Copy, Clone)]
27692769
#[repr(C)]
2770-
pub union __anon_1 {
2770+
pub union __anon_Foo_1 {
27712771
pub name: *mut i8,
27722772
pub tp: *mut std::ffi::c_void,
27732773
}
2774-
impl std::fmt::Debug for __anon_1 {
2774+
impl std::fmt::Debug for __anon_Foo_1 {
27752775
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27762776
write!(f, "(???)")
27772777
}
27782778
}
2779-
impl Default for __anon_1 {
2779+
impl Default for __anon_Foo_1 {
27802780
fn default() -> Self {
27812781
Self {
27822782
name: std::ptr::null_mut(),
@@ -2811,17 +2811,17 @@ struct Foo foo;
28112811
#[derive(Debug, Default, Copy, Clone)]
28122812
#[repr(C)]
28132813
pub struct Foo {
2814-
pub test: __anon_1,
2814+
pub test: __anon_Foo_1,
28152815
}
28162816
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
28172817
#[repr(transparent)]
2818-
pub struct __anon_1(pub u32);
2818+
pub struct __anon_Foo_1(pub u32);
28192819
#[allow(non_upper_case_globals)]
2820-
impl __anon_1 {
2821-
pub const FOO: __anon_1 = __anon_1(1);
2820+
impl __anon_Foo_1 {
2821+
pub const FOO: __anon_Foo_1 = __anon_Foo_1(1);
28222822
}
2823-
impl Default for __anon_1 {
2824-
fn default() -> Self { __anon_1::FOO }
2823+
impl Default for __anon_Foo_1 {
2824+
fn default() -> Self { __anon_Foo_1::FOO }
28252825
}
28262826
"#;
28272827

@@ -2918,40 +2918,40 @@ struct bpf_sock_tuple_5_15 tup;
29182918
#[derive(Debug, Default, Copy, Clone)]
29192919
#[repr(C)]
29202920
pub struct bpf_sock_tuple_5_15 {
2921-
pub __anon_1: __anon_1,
2921+
pub __anon_bpf_sock_tuple_5_15_1: __anon_bpf_sock_tuple_5_15_1,
29222922
pub __pad_36: [u8; 4],
2923-
pub __anon_2: __anon_2,
2923+
pub __anon_bpf_sock_tuple_5_15_2: __anon_bpf_sock_tuple_5_15_2,
29242924
}
29252925
#[derive(Copy, Clone)]
29262926
#[repr(C)]
2927-
pub union __anon_1 {
2928-
pub ipv4: __anon_3,
2929-
pub ipv6: __anon_4,
2927+
pub union __anon_bpf_sock_tuple_5_15_1 {
2928+
pub ipv4: __anon_bpf_sock_tuple_5_15_3,
2929+
pub ipv6: __anon_bpf_sock_tuple_5_15_4,
29302930
}
2931-
impl std::fmt::Debug for __anon_1 {
2931+
impl std::fmt::Debug for __anon_bpf_sock_tuple_5_15_1 {
29322932
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29332933
write!(f, "(???)")
29342934
}
29352935
}
2936-
impl Default for __anon_1 {
2936+
impl Default for __anon_bpf_sock_tuple_5_15_1 {
29372937
fn default() -> Self {
29382938
Self {
2939-
ipv4: __anon_3::default(),
2939+
ipv4: __anon_bpf_sock_tuple_5_15_3::default(),
29402940
}
29412941
}
29422942
}
29432943
#[derive(Copy, Clone)]
29442944
#[repr(C)]
2945-
pub union __anon_2 {
2945+
pub union __anon_bpf_sock_tuple_5_15_2 {
29462946
pub a: i32,
29472947
pub b: *mut i8,
29482948
}
2949-
impl std::fmt::Debug for __anon_2 {
2949+
impl std::fmt::Debug for __anon_bpf_sock_tuple_5_15_2 {
29502950
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29512951
write!(f, "(???)")
29522952
}
29532953
}
2954-
impl Default for __anon_2 {
2954+
impl Default for __anon_bpf_sock_tuple_5_15_2 {
29552955
fn default() -> Self {
29562956
Self {
29572957
a: i32::default(),
@@ -2960,15 +2960,15 @@ impl Default for __anon_2 {
29602960
}
29612961
#[derive(Debug, Default, Copy, Clone)]
29622962
#[repr(C)]
2963-
pub struct __anon_3 {
2963+
pub struct __anon_bpf_sock_tuple_5_15_3 {
29642964
pub saddr: u32,
29652965
pub daddr: u32,
29662966
pub sport: u16,
29672967
pub dport: u16,
29682968
}
29692969
#[derive(Debug, Default, Copy, Clone)]
29702970
#[repr(C)]
2971-
pub struct __anon_4 {
2971+
pub struct __anon_bpf_sock_tuple_5_15_4 {
29722972
pub saddr: [u32; 4],
29732973
pub daddr: [u32; 4],
29742974
pub sport: u16,

0 commit comments

Comments
 (0)