about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-28 03:41:29 +0000
committerbors <bors@rust-lang.org>2019-11-28 03:41:29 +0000
commit96ad8e5fbcf00afc1ccde386b031919b4d01aa33 (patch)
tree05a0a1c735455686eb7a2b43cde8ce6cfafbe72d /src/rustllvm/PassWrapper.cpp
parent42f93dedbe8218b4936002b72dbed6f296979c26 (diff)
parent8fad66b43151c5c1bbb7933e54051ae8c11fe595 (diff)
downloadrust-96ad8e5fbcf00afc1ccde386b031919b4d01aa33.tar.gz
rust-96ad8e5fbcf00afc1ccde386b031919b4d01aa33.zip
Auto merge of #65013 - petertodd:2019-maybeuninit-debug, r=sfackler
Implement Debug for MaybeUninit

Precedent: `UnsafeCell` implements `Debug` even though it can't actually display the value. I noticed this omission while writing the following:

```
#[derive(Debug)]
 pub struct SliceInitializer<'a, T> {
    marker: PhantomData<&'a mut T>,
    uninit: &'a mut [MaybeUninit<T>],
    written: usize,
}
```

...which currently unergonomically fails to compile.

`UnsafeCell` does require `T: Debug`. Because of things like the above I think it'd be better to leave that requirement off. In fact, I'd also suggest removing that requirement for `UnsafeCell` too, which again I noticed in some low-level real world code.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions