diff options
| author | Florian Gilcher <florian.gilcher@asquera.de> | 2014-06-02 12:37:54 +0200 |
|---|---|---|
| committer | Florian Gilcher <florian.gilcher@asquera.de> | 2014-06-02 12:37:54 +0200 |
| commit | 20fb7c62d433addf853b8ab824462fca536aba07 (patch) | |
| tree | 694477c1ce5364a2a9bc1815ed7db85aece1ff94 /src/libstd/fmt.rs | |
| parent | b981add9ee56a2d6dc11aa48f01aac5d0dda9327 (diff) | |
| download | rust-20fb7c62d433addf853b8ab824462fca536aba07.tar.gz rust-20fb7c62d433addf853b8ab824462fca536aba07.zip | |
docs: Stop using `notrust`
Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. This change tags examples in other languages by their language. Plain notations are marked as `text`. Console examples are marked as `console`. Also fix markdown.rs to not highlight non-rust code.
Diffstat (limited to 'src/libstd/fmt.rs')
| -rw-r--r-- | src/libstd/fmt.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/fmt.rs b/src/libstd/fmt.rs index 8dc2dd4bdb6..fd3df63ebd4 100644 --- a/src/libstd/fmt.rs +++ b/src/libstd/fmt.rs @@ -85,7 +85,7 @@ function, but the `format!` macro is a syntax extension which allows it to leverage named parameters. Named parameters are listed at the end of the argument list and have the syntax: -```notrust +```text identifier '=' expression ``` @@ -110,7 +110,7 @@ Each argument's type is dictated by the format string. It is a requirement that every argument is only ever referred to by one type. For example, this is an invalid format string: -```notrust +```text {0:d} {0:s} ``` @@ -126,7 +126,7 @@ must have the type `uint`. Although a `uint` can be printed with `{:u}`, it is illegal to reference an argument as such. For example, this is another invalid format string: -```notrust +```text {:.*s} {0:u} ``` @@ -347,7 +347,7 @@ This example is the equivalent of `{0:s}` essentially. The select method is a switch over a `&str` parameter, and the parameter *must* be of the type `&str`. An example of the syntax is: -```notrust +```text {0, select, male{...} female{...} other{...}} ``` @@ -366,7 +366,7 @@ The plural method is a switch statement over a `uint` parameter, and the parameter *must* be a `uint`. A plural method in its full glory can be specified as: -```notrust +```text {0, plural, offset=1 =1{...} two{...} many{...} other{...}} ``` @@ -394,7 +394,7 @@ should not be too alien. Arguments are formatted with python-like syntax, meaning that arguments are surrounded by `{}` instead of the C-like `%`. The actual grammar for the formatting syntax is: -```notrust +```text format_string := <text> [ format <text> ] * format := '{' [ argument ] [ ':' format_spec ] [ ',' function_spec ] '}' argument := integer | identifier |
