Skip to content

Commit c9890ec

Browse files
committed
corrected lifetime in core::panic::Location::file return type
1 parent 3e21361 commit c9890ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/panic/location.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl<'a> Location<'a> {
183183
#[must_use]
184184
#[stable(feature = "panic_hooks", since = "1.10.0")]
185185
#[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")]
186-
pub const fn file(&self) -> &str {
186+
pub const fn file(&self) -> &'a str {
187187
// SAFETY: The filename is valid.
188188
unsafe { self.filename.as_ref() }
189189
}

0 commit comments

Comments
 (0)