rust/src/libcore
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
..
benches Use fold to implement Iterator::for_each 2017-06-21 13:22:27 -07:00
fmt use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
hash Document that std:#️⃣:Hasher::finish() does not reset the hasher. 2017-08-16 17:02:39 +02:00
iter Minor Iterator::filter_map description rewording. 2017-08-18 21:19:30 -04:00
num Rollup merge of #43891 - Fourchaux:master, r=steveklabnik 2017-08-17 10:44:07 -04:00
ops Fix typos & us spellings 2017-08-15 21:56:30 +02:00
prelude Run rustfmt on libcore/prelude folder 2016-10-16 22:13:04 +05:30
slice use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
str use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
sync Fix typos & us spellings 2017-08-15 21:56:30 +02:00
tests use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
any.rs Various fixes to wording consistency in the docs 2017-03-22 17:19:52 +01:00
array.rs Auto merge of #43690 - scalexm:issue-28229, r=nikomatsakis 2017-08-22 01:34:54 +00:00
borrow.rs Update older URLs pointing to the first edition of the Book 2017-06-15 00:04:00 +09:00
Cargo.toml Integrate jobserver support to parallel codegen 2017-06-21 07:16:43 -07:00
cell.rs Fixed typo in RefCell::get_mut 2017-08-17 10:57:17 +02:00
char.rs std: Stabilize char_escape_debug 2017-07-25 07:09:31 -07:00
char_private.rs Reduce a table used for Debug impl of str. 2017-04-05 09:13:19 -07:00
clone.rs Make Clone a lang item and generate builtin impls. 2017-08-14 15:07:21 +02:00
cmp.rs mark comparison trait methods as #[must_use] 2017-08-08 11:32:10 -07:00
convert.rs Update older URLs pointing to the first edition of the Book 2017-06-15 00:04:00 +09:00
default.rs Fix "Quasi-quoting is inefficient" warning in incremental rustbuild. 2017-07-18 01:49:40 +08:00
internal_macros.rs Fix a few impl stability attributes 2017-01-29 13:31:47 +00:00
intrinsics.rs Follow up commit for the issue 39827 2017-08-12 18:51:10 +10:00
iter_private.rs Various fixes to wording consistency in the docs 2017-03-22 17:19:52 +01:00
lib.rs Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
macros.rs Avoid calling the column!() macro in panic 2017-08-08 11:35:09 +02:00
marker.rs Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
mem.rs Add #[inline] to mem::unreachable 2017-08-11 03:42:36 +02:00
nonzero.rs Add conversions from references to NonZero pointers, Unique, and Shared 2017-07-22 20:38:40 +02:00
option.rs Fixed all unnecessary muts in language core 2017-08-01 23:01:24 +01:00
panicking.rs Bump master to 1.21.0 2017-07-25 07:03:19 -07:00
ptr.rs Make Clone a lang item and generate builtin impls. 2017-08-14 15:07:21 +02:00
raw.rs Fix up various links 2017-03-20 10:10:16 -04:00
result.rs Add missing urls for Result struct 2017-08-18 16:48:07 +02:00
tuple.rs Make Clone a lang item and generate builtin impls. 2017-08-14 15:07:21 +02:00