about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2025-08-27 12:42:49 +0000
committerAlice Ryhl <aliceryhl@google.com>2025-08-27 12:42:49 +0000
commitdacae07b6d8c42f5eca57de9c18e17349994d654 (patch)
treeaf548c17a21713b54d39e1620b215c27f30ac976 /tests
parentb2dd217dd0a099fb87601657ec480bf3e92b30a6 (diff)
downloadrust-dacae07b6d8c42f5eca57de9c18e17349994d654.tar.gz
rust-dacae07b6d8c42f5eca57de9c18e17349994d654.zip
Rename `Location::file_with_nul` to `file_as_c_str`
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/file-is-nul-terminated.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/file-is-nul-terminated.rs b/tests/ui/rfcs/rfc-2091-track-caller/file-is-nul-terminated.rs
index 65e61a21f1a..7902f40b09b 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/file-is-nul-terminated.rs
+++ b/tests/ui/rfcs/rfc-2091-track-caller/file-is-nul-terminated.rs
@@ -5,12 +5,12 @@
 const fn assert_file_has_trailing_zero() {
     let caller = core::panic::Location::caller();
     let file_str = caller.file();
-    let file_with_nul = caller.file_with_nul();
-    if file_str.len() != file_with_nul.count_bytes() {
+    let file_cstr = caller.file_as_c_str();
+    if file_str.len() != file_cstr.count_bytes() {
         panic!("mismatched lengths");
     }
     let trailing_byte: core::ffi::c_char = unsafe {
-        *file_with_nul.as_ptr().offset(file_with_nul.count_bytes() as _)
+        *file_cstr.as_ptr().offset(file_cstr.count_bytes() as _)
     };
     if trailing_byte != 0 {
         panic!("trailing byte was nonzero")