Skip to content

Commit b1f017e

Browse files
authored
Merge pull request rust-lang#2 from martinboehme/update-test-expectations
Update test expectations
2 parents eb9247c + 33e5e16 commit b1f017e

11 files changed

+26
-0
lines changed

tests/expectations/tests/class_with_typedef.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ extern "C" {
6666
pub fn C_method(this: *mut C, c: C_MyInt);
6767
}
6868
extern "C" {
69+
#[bindgen_arg_type_reference(c)]
6970
#[bindgen_original_name("methodRef")]
7071
#[link_name = "\u{1}_ZN1C9methodRefERi"]
7172
pub fn C_methodRef(this: *mut C, c: *mut C_MyInt);
7273
}
7374
extern "C" {
75+
#[bindgen_arg_type_reference(c)]
7476
#[bindgen_original_name("complexMethodRef")]
7577
#[link_name = "\u{1}_ZN1C16complexMethodRefERPKc"]
7678
pub fn C_complexMethodRef(this: *mut C, c: *mut C_Lookup);
@@ -90,10 +92,12 @@ impl C {
9092
pub unsafe fn method(&mut self, c: C_MyInt) {
9193
C_method(self, c)
9294
}
95+
#[bindgen_arg_type_reference(c)]
9396
#[inline]
9497
pub unsafe fn methodRef(&mut self, c: *mut C_MyInt) {
9598
C_methodRef(self, c)
9699
}
100+
#[bindgen_arg_type_reference(c)]
97101
#[inline]
98102
pub unsafe fn complexMethodRef(&mut self, c: *mut C_Lookup) {
99103
C_complexMethodRef(self, c)

tests/expectations/tests/issue-1118-using-forward-decl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
non_upper_case_globals
66
)]
77

8+
#[bindgen_unused_template_param]
89
pub type c = nsTArray;
910
#[repr(C)]
1011
#[derive(Debug, Copy, Clone)]
@@ -87,6 +88,7 @@ impl Default for nsIContent {
8788
}
8889
}
8990
extern "C" {
91+
#[bindgen_unused_template_param_in_arg_or_return]
9092
#[link_name = "\u{1}_Z35Gecko_GetAnonymousContentForElementv"]
9193
pub fn Gecko_GetAnonymousContentForElement() -> *mut nsTArray;
9294
}

tests/expectations/tests/issue-1197-pure-virtual-stuff.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,15 @@ impl Default for Foo {
3030
unsafe { ::std::mem::zeroed() }
3131
}
3232
}
33+
extern "C" {
34+
#[bindgen_pure_virtual]
35+
#[bindgen_original_name("Bar")]
36+
#[link_name = "\u{1}_ZN3Foo3BarEv"]
37+
pub fn Foo_Bar(this: *mut ::std::os::raw::c_void);
38+
}
39+
extern "C" {
40+
#[bindgen_pure_virtual]
41+
#[bindgen_original_name("Foo_destructor")]
42+
#[link_name = "\u{1}_ZN3FooD1Ev"]
43+
pub fn Foo_Foo_destructor(this: *mut Foo);
44+
}

tests/expectations/tests/issue-2019.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ fn bindgen_test_layout_B() {
6262
);
6363
}
6464
extern "C" {
65+
#[bindgen_original_name("make")]
6566
#[link_name = "\u{1}_ZN1B4makeEv"]
6667
pub fn make1() -> B;
6768
}

tests/expectations/tests/issue-833-1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ pub struct nsTArray {
1111
}
1212

1313
extern "C" {
14+
#[bindgen_unused_template_param_in_arg_or_return]
1415
pub fn func() -> *mut nsTArray;
1516
}

tests/expectations/tests/nsBaseHashtable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub struct nsBaseHashtable {
2222
pub _address: u8,
2323
}
2424
pub type nsBaseHashtable_KeyType = [u8; 0usize];
25+
#[bindgen_unused_template_param]
2526
pub type nsBaseHashtable_EntryType = nsBaseHashtableET;
2627
#[repr(C)]
2728
#[derive(Debug, Copy, Clone)]

tests/expectations/tests/opaque_typedef.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ pub struct RandomTemplate {
1212
}
1313
/// <div rustbindgen opaque></div>
1414
pub type ShouldBeOpaque = u8;
15+
#[bindgen_unused_template_param]
1516
pub type ShouldNotBeOpaque = RandomTemplate;

tests/expectations/tests/ref_argument_array.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ impl Default for nsID {
3232
}
3333
}
3434
extern "C" {
35+
#[bindgen_arg_type_reference(aDest)]
3536
#[bindgen_original_name("ToProvidedString")]
3637
#[link_name = "\u{1}_ZN4nsID16ToProvidedStringERA10_c"]
3738
pub fn nsID_ToProvidedString(

tests/expectations/tests/template-param-usage-7.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ impl<T, V> Default for DoesNotUseU<T, V> {
1818
unsafe { ::std::mem::zeroed() }
1919
}
2020
}
21+
#[bindgen_unused_template_param]
2122
pub type Alias = DoesNotUseU<::std::os::raw::c_int, ::std::os::raw::c_char>;

tests/expectations/tests/templateref_opaque.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ pub type detail_PointerType_Type<T> = *mut T;
1616
pub struct UniquePtr {
1717
pub _address: u8,
1818
}
19+
#[bindgen_unused_template_param]
1920
pub type UniquePtr_Pointer = detail_PointerType;

tests/expectations/tests/what_is_going_on.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ impl<F> Default for PointTyped<F> {
3636
unsafe { ::std::mem::zeroed() }
3737
}
3838
}
39+
#[bindgen_unused_template_param]
3940
pub type IntPoint = PointTyped<f32>;

0 commit comments

Comments
 (0)