mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Change fmt! to format!
This commit is contained in:
parent
dce61c980e
commit
0074ae5c8f
@ -482,7 +482,7 @@ syntax, and yet are not implementable as functions. Instead, they are given
|
||||
names, and invoked through a consistent syntax: `name!(...)`. Examples
|
||||
include:
|
||||
|
||||
* `fmt!` : format data into a string
|
||||
* `format!` : format data into a string
|
||||
* `env!` : look up an environment variable's value at compile time
|
||||
* `file!`: return the path to the file being compiled
|
||||
* `stringify!` : pretty-print the Rust expression given as an argument
|
||||
@ -1975,10 +1975,6 @@ Supported traits for `deriving` are:
|
||||
* `Rand`, to create a random instance of a data type.
|
||||
* `Default`, to create an empty instance of a data type.
|
||||
* `Zero`, to create an zero instance of a numeric data type.
|
||||
* `ToStr`, to convert to a string. For a type with this instance,
|
||||
`obj.to_str()` has similar output as `fmt!("%?", obj)`, but it differs in that
|
||||
each constituent field of the type must also implement `ToStr` and will have
|
||||
`field.to_str()` invoked to build up the result.
|
||||
* `FromPrimitive`, to create an instance from a numeric primitve.
|
||||
|
||||
### Stability
|
||||
|
Loading…
Reference in New Issue
Block a user