diff options
| author | Marko Mijalkovic <marko.mijalkovic97@gmail.com> | 2022-04-23 14:41:47 -0400 |
|---|---|---|
| committer | Marko Mijalkovic <marko.mijalkovic97@gmail.com> | 2022-04-23 14:41:47 -0400 |
| commit | 92a584177d1572b8232c3fdd7182c54052a2feb0 (patch) | |
| tree | ef3d5f500a3646eaa17eafc05ef22337eea5f18b /library/core/src/panic | |
| parent | c212fc4aa7719613e5254e9051ea03a93558fef4 (diff) | |
| download | rust-92a584177d1572b8232c3fdd7182c54052a2feb0.tar.gz rust-92a584177d1572b8232c3fdd7182c54052a2feb0.zip | |
Inline core::panic::Location methods
Diffstat (limited to 'library/core/src/panic')
| -rw-r--r-- | library/core/src/panic/location.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/panic/location.rs b/library/core/src/panic/location.rs index 714e9b73c78..8eefd9ff20d 100644 --- a/library/core/src/panic/location.rs +++ b/library/core/src/panic/location.rs @@ -83,6 +83,7 @@ impl<'a> Location<'a> { #[stable(feature = "track_caller", since = "1.46.0")] #[rustc_const_unstable(feature = "const_caller_location", issue = "76156")] #[track_caller] + #[inline] pub const fn caller() -> &'static Location<'static> { crate::intrinsics::caller_location() } @@ -122,6 +123,7 @@ impl<'a> Location<'a> { /// ``` #[must_use] #[stable(feature = "panic_hooks", since = "1.10.0")] + #[inline] pub fn file(&self) -> &str { self.file } @@ -145,6 +147,7 @@ impl<'a> Location<'a> { /// ``` #[must_use] #[stable(feature = "panic_hooks", since = "1.10.0")] + #[inline] pub fn line(&self) -> u32 { self.line } @@ -168,6 +171,7 @@ impl<'a> Location<'a> { /// ``` #[must_use] #[stable(feature = "panic_col", since = "1.25.0")] + #[inline] pub fn column(&self) -> u32 { self.col } |
