]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #24870: tshepang/reference-fix-brackets
authorAlex Crichton <alex@alexcrichton.com>
Wed, 29 Apr 2015 22:45:39 +0000 (15:45 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 29 Apr 2015 22:45:39 +0000 (15:45 -0700)
Also, remove the other brackets, because they make the whole sentence look awkward.

1  2 
src/doc/reference.md

diff --combined src/doc/reference.md
index a71f8cf4250a6465f5ce6a0799f409a509032f30,8bd481810085c19cfca1215901033466fe12460e..05daf73ef62692730aa534a60f7dfd3f3d6b0856
@@@ -84,7 -84,7 +84,7 @@@ that does _not_ occur in the set of [ke
  ## Comments
  
  Comments in Rust code follow the general C++ style of line (`//`) and
 -block-comment (`/* ... */`) forms. Nested block comments are supported.
 +block (`/* ... */`) comment forms. Nested block comments are supported.
  
  Line comments beginning with exactly _three_ slashes (`///`), and block
  comments beginning with exactly one repeated asterisk in the block-open
@@@ -192,13 -192,13 +192,13 @@@ which must be _escaped_ by a preceding 
  
  A _string literal_ is a sequence of any Unicode characters enclosed within two
  `U+0022` (double-quote) characters, with the exception of `U+0022` itself,
 -which must be _escaped_ by a preceding `U+005C` character (`\`), or a _raw
 -string literal_.
 +which must be _escaped_ by a preceding `U+005C` character (`\`).
  
 -A multi-line string literal may be defined by terminating each line with a
 -`U+005C` character (`\`) immediately before the newline. This causes the
 -`U+005C` character, the newline, and all whitespace at the beginning of the
 -next line to be ignored.
 +Line-break characters are allowed in string literals. Normally they represent
 +themselves (i.e. no translation), but as a special exception, when a `U+005C`
 +character (`\`) occurs immediately before the newline, the `U+005C` character,
 +the newline, and all whitespace at the beginning of the next line are ignored.
 +Thus `a` and `b` are equal:
  
  ```rust
  let a = "foobar";
@@@ -366,19 -366,11 +366,19 @@@ A _floating-point literal_ has one of t
    optionally followed by another decimal literal, with an optional _exponent_.
  * A single _decimal literal_ followed by an _exponent_.
  
 -By default, a floating-point literal has a generic type, and, like integer
 -literals, the type must be uniquely determined from the context. There are two valid
 +Like integer literals, a floating-point literal may be followed by a
 +suffix, so long as the pre-suffix part does not end with `U+002E` (`.`).
 +The suffix forcibly sets the type of the literal. There are two valid
  _floating-point suffixes_, `f32` and `f64` (the 32-bit and 64-bit floating point
  types), which explicitly determine the type of the literal.
  
 +The type of an _unsuffixed_ floating-point literal is determined by type
 +inference. If a floating-point type can be _uniquely_ determined from the
 +surrounding program context, the unsuffixed floating-point literal has that type.
 +If the program context underconstrains the type, it defaults to double-precision `f64`;
 +if the program context overconstrains the type, it is considered a static type
 +error.
 +
  Examples of floating-point literals of various forms:
  
  ```
@@@ -1897,8 -1889,8 +1897,8 @@@ release builds
  
  There are two kinds of configuration options, one that is either defined or not
  (`#[cfg(foo)]`), and the other that contains a string that can be checked
- against (`#[cfg(bar = "baz")]` (currently only compiler-defined configuration
- options can have the latter form).
+ against (`#[cfg(bar = "baz")]`). Currently, only compiler-defined configuration
+ options can have the latter form.
  
  ```
  // The function is only included in the build when compiling for OSX
@@@ -2135,10 -2127,7 +2135,10 @@@ The currently implemented features of t
            semantics are likely to change, so this macro usage must be opted
            into.
  
 -* `associated_types` - Allows type aliases in traits. Experimental.
 +* `associated_consts` - Allows constants to be defined in `impl` and `trait`
 +                        blocks, so that they can be associated with a type or
 +                        trait in a similar manner to methods and associated
 +                        types.
  
  * `box_patterns` - Allows `box` patterns, the exact semantics of which
                     is subject to change.