Skip to content

Commit

Permalink
Test the literal_cstr feature with different editions
Browse files Browse the repository at this point in the history
Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
  • Loading branch information
pvdrz and nyurik committed Nov 30, 2024
1 parent dccbdf1 commit c4440b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bindgen-tests/tests/expectations/tests/strings_cstr2_2018.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions bindgen-tests/tests/headers/strings_cstr2_2018.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// bindgen-flags: --rust-target=1.77 --rust-edition=2018 --generate-cstr

const char* MY_STRING_UTF8 = "Hello, world!";
const char* MY_STRING_INTERIOR_NULL = "Hello,\0World!";
const char* MY_STRING_NON_UTF8 = "ABCDE\xFF";

0 comments on commit c4440b3

Please sign in to comment.