]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #59451 - TimDiekmann:patch-1, r=sfackler
authorJosh Stone <cuviper@gmail.com>
Thu, 28 Mar 2019 01:15:41 +0000 (18:15 -0700)
committerGitHub <noreply@github.com>
Thu, 28 Mar 2019 01:15:41 +0000 (18:15 -0700)
commit44c411ec6f5aea339fe66d5f22548323cbad2edb
tree79eec0b76f2f6aecfa619a897f3355fcfb27aba1
parent6e65ae779f84ae7e103c202d41338180988b4a62
parent8733b2ab0c6bfe60df594e41ee9b1ce1f8caeaa0
Rollup merge of #59451 - TimDiekmann:patch-1, r=sfackler

Add `Default` to `std::alloc::System`

`System` is a unit struct, thus, it can be constructed without any additional information. Therefore `Default` is a noop. However, in generic code, a `T: Default` may happen as in

```rust
#[derive(Default)]
struct Foo<A> {
    allocator: A
}
```

Does this need a feature gate?
Should I also add `PartialEq/Eq/PartialOrd/Ord/Hash`?