Skip to content

Commit

Permalink
Reword auto comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 9, 2025
1 parent 09d9f00 commit 754119b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/ffi/tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,7 @@ extern "C" const char *cxx_run_test() noexcept {
ASSERT(cstr == "foo");
ASSERT(other_cstr == "test");

// u8"foo" is `const char*` before, and `const char8_t*` after C++20, so using
// `auto`.
// Auto because u8"..." is `const char*` before C++20, and `const char8_t*` since.
const auto *utf8_literal = u8"Test string";
const char16_t *utf16_literal = u"Test string";
rust::String utf8_rstring = utf8_literal;
Expand Down

0 comments on commit 754119b

Please sign in to comment.