rust/library
bors d9d89fd53d Auto merge of #119807 - Emilgardis:track_caller_from_impl_into, r=Nilstrieb
Add `#[track_caller]` to the "From implies Into" impl

This pr implements what was mentioned in https://github.com/rust-lang/rust/issues/77474#issuecomment-1074480790

This follows from my URLO https://users.rust-lang.org/t/104497

```rust
#![allow(warnings)]
fn main() {
    // Gives a good location
    let _: Result<(), Loc> = dbg!(Err::<(), _>(()).map_err(|e| e.into()));

    // still doesn't work, gives location of `FnOnce::call_once()`
    let _: Result<(), Loc> = dbg!(Err::<(), _>(()).map_err(Into::into));
}

#[derive(Debug)]
pub struct Loc {
    pub l: &'static std::panic::Location<'static>,
}

impl From<()> for Loc {
    #[track_caller]
    fn from(_: ()) -> Self {
        Loc {
            l: std::panic::Location::caller(),
        }
    }
}
```
2024-01-21 14:17:25 +00:00
..
alloc Auto merge of #85528 - the8472:iter-markers, r=dtolnay 2024-01-21 11:17:46 +00:00
backtrace@6145fe6bac Update backtrace submodule 2023-11-21 16:33:42 +01:00
core Auto merge of #119807 - Emilgardis:track_caller_from_impl_into, r=Nilstrieb 2024-01-21 14:17:25 +00:00
panic_abort add teeos std impl 2023-12-07 10:33:03 +08:00
panic_unwind Update test for E0796 and static_mut_ref lint 2024-01-07 17:29:25 +03:00
portable-simd Fix target_feature config in portable-simd 2023-12-14 14:50:32 +01:00
proc_macro proc_macro_c_str_literals: Implement Literal::c_string constructor 2024-01-16 13:27:58 -08:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup library: Fix warnings in rtstartup 2024-01-06 01:32:03 +03:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #119996 - joboet:move_pal_os_str, r=ChrisDenton 2024-01-21 06:38:37 +01:00
stdarch@f4528dd6e8 Bump stdarch submodule 2023-10-12 11:11:29 +02:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test Auto merge of #118548 - Enselic:bench-padding, r=thomcc,ChrisDenton 2024-01-12 05:06:03 +00:00
unwind Enable Static Builds for FreeBSD 2024-01-11 15:26:16 +00:00