Skip to content

Commit a9d4198

Browse files
authored
Document callback changes and avoid static lifetime (#2366)
1 parent 199dfcc commit a9d4198

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@
156156
## Changed
157157
* Fixed name collisions when having a C `enum` and a `typedef` with the same
158158
name.
159+
* The `ParseCallbacks::generated_name_override` now receives `ItemInfo<'_>` as
160+
argument instead of a `&str`.
159161

160162
## Removed
161163

bindgen/callbacks.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ pub trait ParseCallbacks: fmt::Debug {
3232

3333
/// This function will run for every extern variable and function. The returned value determines
3434
/// the name visible in the bindings.
35-
fn generated_name_override(&self, _item_info: ItemInfo) -> Option<String> {
35+
fn generated_name_override(
36+
&self,
37+
_item_info: ItemInfo<'_>,
38+
) -> Option<String> {
3639
None
3740
}
3841

0 commit comments

Comments
 (0)