diff options
| author | bors <bors@rust-lang.org> | 2014-06-02 17:16:31 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-02 17:16:31 -0700 |
| commit | 63e9b8f105ba0fe18e99cb280a23db82380960f4 (patch) | |
| tree | ee65b10c16ef7181ba34f0653cae3b3672734cf7 /src/libstd | |
| parent | 455f574470a3a3f755522bc0fb6594ec10eeda40 (diff) | |
| parent | 20fb7c62d433addf853b8ab824462fca536aba07 (diff) | |
| download | rust-63e9b8f105ba0fe18e99cb280a23db82380960f4.tar.gz rust-63e9b8f105ba0fe18e99cb280a23db82380960f4.zip | |
auto merge of #14601 : skade/rust/remove-notrust-tags, r=alexcrichton
Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. `norust` as a negative statement is a bad tag. 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. Amends the documentation to reflect the new behaviour.
Diffstat (limited to 'src/libstd')
| -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 |
