diff options
| author | Isaac Chen <isaacjchen1@gmail.com> | 2024-10-23 20:13:56 -0400 |
|---|---|---|
| committer | Isaac Chen <isaacjchen1@gmail.com> | 2025-08-02 16:43:07 -0400 |
| commit | e772f7ab3ee7d5f217c60b640b95f8bfc84d9536 (patch) | |
| tree | 46c12e9e12051662b472d38f2ed428d2c444e836 /library/core/src/panic | |
| parent | 6d091b2baa33698682453c7bb72809554204e434 (diff) | |
| download | rust-e772f7ab3ee7d5f217c60b640b95f8bfc84d9536.tar.gz rust-e772f7ab3ee7d5f217c60b640b95f8bfc84d9536.zip | |
corrected lifetime in core::panic::Location::file return type
Diffstat (limited to 'library/core/src/panic')
| -rw-r--r-- | library/core/src/panic/location.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/panic/location.rs b/library/core/src/panic/location.rs index 6ef7d5a22a3..e81dc5eb530 100644 --- a/library/core/src/panic/location.rs +++ b/library/core/src/panic/location.rs @@ -183,7 +183,7 @@ impl<'a> Location<'a> { #[must_use] #[stable(feature = "panic_hooks", since = "1.10.0")] #[rustc_const_stable(feature = "const_location_fields", since = "1.79.0")] - pub const fn file(&self) -> &str { + pub const fn file(&self) -> &'a str { // SAFETY: The filename is valid. unsafe { self.filename.as_ref() } } |
