提交 769c2e5f 编写于 作者: H Huon Wilson 提交者: Daniel Micay

Minor doc updates to reflect #[deriving(Zero)], and small release notes adjustments.

The `extra::fileinput` module landed just after 0.6 was released, and there are many
more derivable traits.
上级 9e95bc4b
......@@ -7,8 +7,9 @@ Version 0.7 (July 2013)
* `use mod` is no longer valid.
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
argument list.
* `Encodable`, `Decodable`, `TotalOrd`, `TotalEq`, `DeepClone` can all
be automatically derived with `#[deriving(...)]`.
* `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
`Rand`, `Zero` and `ToStr` can all be automatically derived with
`#[deriving(...)]`.
* The `Durable` trait is replaced with the `'static` bounds.
* At long last, 'argument modes' no longer exist.
* The `bytes!` macro returns a vector of bytes for string, u8, char,
......@@ -55,8 +56,8 @@ Version 0.7 (July 2013)
`(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
* std: many types implement `Clone`.
* std: `path` type renamed to `Path`.
* std: Many standalone functions removed in favor of methods in
`vec`, `str`. In the future methods will also work as functions.
* std: Many standalone functions removed in favor of methods and iterators
in `vec`, `str`. In the future methods will also work as functions.
* std: `reinterpret_cast` removed. Used `transmute`.
* std: ascii string handling in `std::ascii`.
* std: `Rand` is implemented for ~/@.
......@@ -71,7 +72,7 @@ Version 0.7 (July 2013)
* std: `Cell` constructors converted to static methods.
* extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
* extra: `flate` module moved from `std` to `extra`.
* extra: `FileInput` implements `std::io::Reader`.
* extra: `fileinput` module for iterating over a series of files.
* extra: `Complex` number type and `complex` module.
* extra: `Rational` number type and `rational` module.
* extra: `BigInt`, `BigUint` implement numeric and comparison traits.
......
......@@ -1561,6 +1561,7 @@ Supported traits for `deriving` are:
* `Clone` and `DeepClone`, to perform (deep) copies.
* `IterBytes`, to iterate over the bytes in a data type.
* `Rand`, to create a random instance of a data type.
* `Zero`, to create an zero (or empty) instance of a data type.
* `ToStr`, to convert to a string. For a type with this instance,
`obj.to_str()` has the same output as `fmt!("%?", obj)`.
......
......@@ -2319,7 +2319,7 @@ enum ABC { A, B, C }
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
`IterBytes`, `Rand` and `ToStr`.
`IterBytes`, `Rand`, `Zero`, and `ToStr`.
# Modules and crates
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册