File tree Expand file tree Collapse file tree 3 files changed +260
-123
lines changed Expand file tree Collapse file tree 3 files changed +260
-123
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ pub enum Error {
11
11
/// definition that is too difficult for us to understand (like a partial
12
12
/// template specialization).
13
13
InstantiationOfOpaqueType ,
14
+
15
+ /// Type was a reference not a pointer, but we had nowhere to record that fact.
16
+ ReferenceButCouldNotRecord ,
14
17
}
15
18
16
19
impl fmt:: Display for Error {
@@ -23,6 +26,9 @@ impl fmt::Display for Error {
23
26
"Instantiation of opaque template type or partial template \
24
27
specialization"
25
28
}
29
+ Error :: ReferenceButCouldNotRecord => {
30
+ "Type was a reference in a context where we only expected other types"
31
+ }
26
32
} )
27
33
}
28
34
}
Original file line number Diff line number Diff line change @@ -74,6 +74,18 @@ pub mod attributes {
74
74
#[ bindgen_original_name( #name) ]
75
75
}
76
76
}
77
+
78
+ pub fn ret_type_reference ( ) -> TokenStream {
79
+ quote ! {
80
+ #[ bindgen_ret_type_reference]
81
+ }
82
+ }
83
+
84
+ pub fn arg_type_reference ( arg_name : & Ident ) -> TokenStream {
85
+ quote ! {
86
+ #[ bindgen_arg_type_reference( #arg_name) ]
87
+ }
88
+ }
77
89
}
78
90
79
91
/// Generates a proper type for a field or type with a given `Layout`, that is,
You can’t perform that action at this time.
0 commit comments