rust/library/std/src
bors 18135ec85b Auto merge of #85745 - veber-alex:panic_any, r=m-ou-se
Add #[track_caller] to panic_any

Report the panic location from the user code.

```rust
use std::panic;
use std::panic::panic_any;

fn main() {
    panic::set_hook(Box::new(|panic_info| {
        if let Some(location) = panic_info.location() {
            println!(
                "panic occurred in file '{}' at line {}",
                location.file(),
                location.line(),
            );
        } else {
            println!("panic occurred but can't get location information...");
        }
    }));

    panic_any(42);
}
````

Before:
`panic occurred in file '/rustc/ff2c947c00f867b9f012e28ba88cecfbe556f904/library/std/src/panic.rs' at line 59`

After:
`panic occurred in file 'src/main.rs' at line 17`
2021-05-28 06:08:58 +00:00
..
backtrace Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
collections Rollup merge of #84328 - Folyd:stablize_map_into_keys_values, r=m-ou-se 2021-05-06 13:30:54 +02:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
ffi Add inline attr to private CString::into_inner 2021-05-26 13:12:54 +03:00
fs Fix test metadata_access_times to also check for Unsupported 2021-04-18 09:29:24 +02:00
io remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
lazy Upgrade wasm32 image to Ubuntu 20.04 2021-02-06 13:05:56 +01:00
net Move stability attribute for methods under the ip feature from the module to the methods themselves 2021-05-25 15:57:27 +02:00
num rustc_expand: Mark inner #![test] attributes as soft-unstable 2020-11-20 19:35:03 +03:00
os Not implement os::unix::fs::chroot for vxworks 2021-05-20 01:37:57 +02:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path Refactor parse_prefix on Windows 2020-11-07 16:15:48 +01:00
prelude Bump cfgs 2021-04-04 14:57:05 -04:00
process std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sync minor rewording after review 2021-05-24 09:24:35 -05:00
sys Rename opensbd to openbsd 2021-05-26 23:17:13 -07:00
sys_common Auto merge of #85060 - ChrisDenton:win-file-exists, r=yaahc 2021-05-21 05:47:24 +00:00
thread std: Don't inline TLS accessor on MinGW 2021-05-20 12:45:05 -07:00
time Duration::zero() -> Duration::ZERO 2020-10-21 20:44:03 -07:00
alloc.rs Rename rterr to rtprintpanic 2021-05-19 15:52:09 +02:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs Add Frames iterator for Backtrace 2021-01-23 11:56:33 -06:00
env.rs change k to key and v to v in std::env mod 2021-05-10 19:31:09 +08:00
error.rs Document "standard" conventions for error messages 2021-04-02 15:11:49 +03:00
f32.rs doc: cube root, not cubic root 2021-02-26 19:03:44 +01:00
f64.rs doc: cube root, not cubic root 2021-02-26 19:03:44 +01:00
fs.rs Move the implementation of Path::exists to sys_common::fs so platforms can specialize it 2021-05-19 23:54:56 +01:00
keyword_docs.rs Fix indentation in move keyword documentation 2021-05-13 23:01:38 +02:00
lazy.rs Use DebugStruct::finish_non_exhaustive() in std. 2021-03-27 13:29:23 +01:00
lib.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
macros.rs Change "etc." to "and similar" 2021-05-13 15:02:02 +01:00
num.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
panic.rs Add #[track_caller] to panic_any 2021-05-27 14:19:47 +03:00
panicking.rs Rename rterr to rtprintpanic 2021-05-19 15:52:09 +02:00
path.rs Move the implementation of Path::exists to sys_common::fs so platforms can specialize it 2021-05-19 23:54:56 +01:00
primitive_docs.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
process.rs impl crate::error::Error for ExitStatusError 2021-05-12 11:12:20 +01:00
rt.rs Remove Once from init 2021-04-22 18:00:18 +02:00
time.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00