Matthias Krüger df11395a55
Rollup merge of #101040 - danielhenrymantilla:no-bounds-for-default-annotated-derive, r=joshtriplett
Fix `#[derive(Default)]` on a generic `#[default]` enum adding unnecessary `Default` bounds

That is, given something like:

```rs
// #[default] on a generic enum does not add `Default` bounds to the type params.
#[derive(Default)]
enum MyOption<T> {
    #[default]
    None,
    Some(T),
}
```

then `MyOption<T> : Default`_as currently implemented_ only holds when `T : Default`, as reported by ```@5225225``` [over Zulip](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.23.5Bderive.28Default.29.5D.20for.20enums.20with.20fields).

This is contrary to [what the accepted RFC proposes](https://rust-lang.github.io/rfcs/3107-derive-default-enum.html#generated-bounds) (_i.e._, that `T` be allowed not to be itself `Default`), and indeed seems to be a rather unnecessary limitation.
2022-10-03 20:58:55 +02:00
..
2022-09-27 13:31:52 +02:00
2022-08-22 07:35:33 +10:00
2022-08-17 08:10:56 +10:00
2022-07-29 15:52:15 +10:00
2022-09-14 08:49:10 +08:00
2022-10-01 11:45:52 -05:00
2022-08-16 11:17:15 +10:00
2022-10-02 21:40:39 +03:00
2022-07-29 15:52:15 +10:00