}
impl<'a> PanicInfo<'a> {
- #[unstable(feature = "panic_internals",
- reason = "internal details of the implementation of the `panic!` \
+ #[unstable(
+ feature = "panic_internals",
+ reason = "internal details of the implementation of the `panic!` \
and related macros",
- issue = "none")]
+ issue = "none"
+ )]
#[doc(hidden)]
#[inline]
pub fn internal_constructor(
location: &'a Location<'a>,
) -> Self {
struct NoPayload;
- PanicInfo {
- location,
- message,
- payload: &NoPayload,
- }
+ PanicInfo { location, message, payload: &NoPayload }
}
- #[unstable(feature = "panic_internals",
- reason = "internal details of the implementation of the `panic!` \
+ #[unstable(
+ feature = "panic_internals",
+ reason = "internal details of the implementation of the `panic!` \
and related macros",
- issue = "none")]
+ issue = "none"
+ )]
#[doc(hidden)]
#[inline]
pub fn set_payload(&mut self, info: &'a (dyn Any + Send)) {
/// assert_ne!(this_location.line(), another_location.line());
/// assert_ne!(this_location.column(), another_location.column());
/// ```
- #[unstable(feature = "track_caller",
- reason = "uses #[track_caller] which is not yet stable",
- issue = "47809")]
+ #[unstable(
+ feature = "track_caller",
+ reason = "uses #[track_caller] which is not yet stable",
+ issue = "47809"
+ )]
#[track_caller]
pub const fn caller() -> &'static Location<'static> {
crate::intrinsics::caller_location()
}
impl<'a> Location<'a> {
- #![unstable(feature = "panic_internals",
- reason = "internal details of the implementation of the `panic!` \
+ #![unstable(
+ feature = "panic_internals",
+ reason = "internal details of the implementation of the `panic!` \
and related macros",
- issue = "none")]
+ issue = "none"
+ )]
#[doc(hidden)]
pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
Location { file, line, col }