mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 05:56:56 +00:00
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
@ -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…
Reference in New Issue
Block a user