diff options
| author | bors <bors@rust-lang.org> | 2019-11-28 03:41:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-28 03:41:29 +0000 |
| commit | 96ad8e5fbcf00afc1ccde386b031919b4d01aa33 (patch) | |
| tree | 05a0a1c735455686eb7a2b43cde8ce6cfafbe72d /src/rustllvm/PassWrapper.cpp | |
| parent | 42f93dedbe8218b4936002b72dbed6f296979c26 (diff) | |
| parent | 8fad66b43151c5c1bbb7933e54051ae8c11fe595 (diff) | |
| download | rust-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
