about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-23 07:00:30 +0000
committerbors <bors@rust-lang.org>2020-11-23 07:00:30 +0000
commit068320b39e3e4839d832b3aa71fa910ba170673b (patch)
treec019697eb36323b15719bf75d28410961ccaddcf /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent1823a87986c6acf0765c0101d75bca5328416a60 (diff)
parent28f8e6244b3349b73ae9413fabaf6eb01c80807e (diff)
downloadrust-068320b39e3e4839d832b3aa71fa910ba170673b.tar.gz
rust-068320b39e3e4839d832b3aa71fa910ba170673b.zip
Auto merge of #77893 - petertodd:2020-impl-default-for-phantompinned, r=dtolnay
Impl Default for PhantomPinned

`PhantomPinned` is just a marker type, with an obvious default value (the only value). So I can't think of a reason not to do this. Sure, it's used in exotic situations with unsafe code. But the people writing that code can decide for themselves if they can derive `Default`, and in many situations the derived impl will make sense:

```rust
#[derive(Default)]
struct NeedsPin {
   marker: PhantomPinned,
   buf: [u8; 1024],
   ptr_to_data: Option<*const u8>,
}
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions