# Struct std::panic::Location [−] [src]

    pub struct Location<'a> {
        // some fields omitted
    }

Unstable (`panic_handler` #30449)

: awaiting feedback

A struct containing information about the location of a panic.

## Methods

### `impl<'a> Location<'a>`

#### `fn file(&self) -> &str`

Unstable (`panic_handler` #30449)

: awaiting feedback

Returns the name of the source file from which the panic originated.

#### `fn line(&self) -> u32`

Unstable (`panic_handler` #30449)

: awaiting feedback

Returns the line number from which the panic originated.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)