Auto merge of #95619 - bjorn3:inline_location_caller, r=scottmcm
Mark Location::caller() as #[inline] This function gets compiled to a single register move as it actually gets it's return value passed in as argument.
This commit is contained in:
commit
596deceaac
1 changed files with 1 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue