Skip to content

Commit 5de3677

Browse files
committed
feat(tests): add tests for rustbindgen annotations
1 parent 9f3c861 commit 5de3677

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

bindgen-tests/tests/expectations/tests/attribute-custom.rs

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/headers/attribute-custom-cli.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ union foo_union {
1212
struct non_matching {
1313
int inner;
1414
};
15-
int foo_function() { return 1; }
15+
int foo_function() { return 1; }

bindgen-tests/tests/headers/attribute-custom.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ struct my_type2 {
2626
struct my_type3 {
2727
unsigned long a;
2828
};
29+
30+
/**
31+
* <div rustbindgen attribute="#[must_use]" attribute="#[doc(hidden)]"></div>
32+
*/
33+
int function_attributes() { return 1; }

0 commit comments

Comments
 (0)