mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 21:05:12 +00:00
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:
parent
15a242a432
commit
6d0b61e2f5
@ -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