Skip to content

Commit 94472e3

Browse files
pvdrznyurik
andcommitted
Test the literal_cstr feature with different editions
Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
1 parent ac0c52b commit 94472e3

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

bindgen-tests/tests/expectations/tests/strings_cstr2_2018.rs

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// bindgen-flags: --rust-target=1.77 --rust-edition=2018 --generate-cstr
2+
3+
const char* MY_STRING_UTF8 = "Hello, world!";
4+
const char* MY_STRING_INTERIOR_NULL = "Hello,\0World!";
5+
const char* MY_STRING_NON_UTF8 = "ABCDE\xFF";

hello.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.70.1 */
2+
3+
pub const MY_STRING_UTF8 : & :: std :: ffi :: CStr = c"Hello, world!" ; pub const MY_STRING_INTERIOR_NULL : & :: std :: ffi :: CStr = c"Hello," ; pub const MY_STRING_NON_UTF8 : & :: std :: ffi :: CStr = c"ABCDE\xFF" ;

0 commit comments

Comments
 (0)