auto merge of #13023 : thestinger/rust/deep_clone, r=alexcrichton
This commit is contained in:
commit
6eae7df43c
@ -2033,7 +2033,7 @@ Supported traits for `deriving` are:
|
||||
|
||||
* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
|
||||
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
|
||||
* `Clone` and `DeepClone`, to perform (deep) copies.
|
||||
* `Clone`, to create `T` from `&T` via a copy.
|
||||
* `Hash`, to iterate over the bytes in a data type.
|
||||
* `Rand`, to create a random instance of a data type.
|
||||
* `Default`, to create an empty instance of a data type.
|
||||
|
@ -2538,7 +2538,7 @@ enum ABC { A, B, C }
|
||||
~~~
|
||||
|
||||
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
|
||||
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
|
||||
`TotalOrd`, `Encodable` `Decodable`, `Clone`,
|
||||
`Hash`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
|
||||
|
||||
# Crates and the module system
|
||||
|
@ -116,7 +116,7 @@ traits = {
|
||||
}
|
||||
|
||||
for (trait, supers, errs) in [('Rand', [], 1),
|
||||
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
|
||||
('Clone', [], 1),
|
||||
('Eq', [], 2), ('Ord', [], 8),
|
||||
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1),
|
||||
('Show', [], 1),
|
||||
|
@ -72,7 +72,7 @@ syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
|
||||
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr IntoBytes
|
||||
syn keyword rustTrait ToCStr
|
||||
syn keyword rustTrait Char
|
||||
syn keyword rustTrait Clone DeepClone
|
||||
syn keyword rustTrait Clone
|
||||
syn keyword rustTrait Eq Ord TotalEq TotalOrd Ordering Equiv
|
||||
syn keyword rustEnumVariant Less Equal Greater
|
||||
syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet
|
||||
|
Loading…
Reference in New Issue
Block a user