rust/library/core
Michael Goulet 3013cd83cc
Rollup merge of #133282 - tgross35:maybe-uninit-debug, r=Amanieu
Shorten the `MaybeUninit` `Debug` implementation

Currently the `Debug` implementation for `MaybeUninit` winds up being pretty verbose. This struct:

```rust
#[derive(Debug)]
pub struct Foo {
    pub a: u32,
    pub b: &'static str,
    pub c: MaybeUninit<u32>,
    pub d: MaybeUninit<String>,
}
```

Prints as:

    Foo {
        a: 0,
        b: "hello",
        c: core::mem::maybe_uninit::MaybeUninit<u32>,
        d: core::mem::maybe_uninit::MaybeUninit<alloc::string::String>,
    }

The goal is just to be a standin for content so the path prefix doesn't add any useful information. Change the implementation to trim `MaybeUninit`'s leading path, meaning the new result is now:

    Foo {
        a: 0,
        b: "hello",
        c: MaybeUninit<u32>,
        d: MaybeUninit<alloc::string::String>,
    }
2024-11-26 12:03:42 -05:00
..
benches Auto merge of #122770 - iximeow:ixi/int-formatting-optimization, r=workingjubilee 2024-11-14 04:17:20 +00:00
src Rollup merge of #133282 - tgross35:maybe-uninit-debug, r=Amanieu 2024-11-26 12:03:42 -05:00
tests Rollup merge of #133282 - tgross35:maybe-uninit-debug, r=Amanieu 2024-11-26 12:03:42 -05:00
Cargo.toml Port std library to RTEMS 2024-09-03 09:19:29 +02:00