bors 942711e115 Auto merge of #43690 - scalexm:issue-28229, r=nikomatsakis
Generate builtin impls for `Clone`

This fixes a long-standing ICE and limitation where some builtin types implement `Copy` but not `Clone` (whereas `Clone` is a super trait of `Copy`).

However, this PR has a few side-effects:
* `Clone` is now marked as a lang item.
* `[T; N]` is now `Clone` if `T: Clone` (currently, only if `T: Copy` and for `N <= 32`).
* `fn foo<'a>() where &'a mut (): Clone { }` won't compile anymore because of how bounds for builtin traits are handled (e.g. same thing currently if you replace `Clone` by `Copy` in this example). Of course this function is unusable anyway, an error would pop as soon as it is called.

Hence, I'm wondering wether this PR would need an RFC...
Also, cc-ing @nikomatsakis, @arielb1.

Related issues: #28229, #24000.
2017-08-22 01:34:54 +00:00
..
2017-08-15 15:29:17 -07:00
2017-08-15 21:56:30 +02:00
2017-08-15 15:29:17 -07:00
2017-08-15 15:29:17 -07:00
2017-08-15 21:56:30 +02:00
2017-08-15 15:29:17 -07:00
2017-08-17 10:57:17 +02:00
2017-08-11 03:42:36 +02:00
2017-08-18 16:48:07 +02:00