File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
tests/ui/rfcs/rfc-2091-track-caller Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,10 @@ impl<'a> Location<'a> {
193
193
/// This is useful for interop with APIs that expect C/C++ `__FILE__` or
194
194
/// `std::source_location::file_name`, both of which return a nul-terminated `const char*`.
195
195
#[ must_use]
196
- #[ unstable( feature = "file_with_nul" , issue = "141727" ) ]
197
196
#[ inline]
198
- pub const fn file_as_c_str ( & self ) -> & ' a CStr {
197
+ #[ stable( feature = "file_with_nul" , since = "CURRENT_RUSTC_VERSION" ) ]
198
+ #[ rustc_const_stable( feature = "file_with_nul" , since = "CURRENT_RUSTC_VERSION" ) ]
199
+ pub const fn file_as_c_str ( & self ) -> & CStr {
199
200
let filename = self . filename . as_ptr ( ) ;
200
201
201
202
// SAFETY: The filename is valid for `filename_len+1` bytes, so this addition can't
Original file line number Diff line number Diff line change 1
1
//@ run-pass
2
- #![ feature( file_with_nul) ]
3
2
4
3
#[ track_caller]
5
4
const fn assert_file_has_trailing_zero ( ) {
You can’t perform that action at this time.
0 commit comments