]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #24924 - carols10cents:grammar-improvements, r=pnkfelix
authorbors <bors@rust-lang.org>
Thu, 30 Apr 2015 17:07:14 +0000 (17:07 +0000)
committerbors <bors@rust-lang.org>
Thu, 30 Apr 2015 17:07:14 +0000 (17:07 +0000)
I'm interested in helping out with #16676 but more in the grammar than the reference-- here's my first chunk, more to come!! :tada:

I did pull a bit *out* of the reference, though, that was more relevant to the grammar but wasn't moved over as part of #24729.

I'm looking at, e.g. https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs, as the source of truth, please let me know if I should be checking against something else instead/in addition.

r? @steveklabnik

1  2 
src/doc/reference.md

diff --combined src/doc/reference.md
index 19cbd6f90a58146402abf38283d285cac38cae85,474e09b2c413fa6432f37e68a99182ff5bf5ab61..4485704c3d523b83983904ecd5721d372593c829
@@@ -103,7 -103,7 +103,7 @@@ Non-doc comments are interpreted as a f
  
  ## Whitespace
  
 -Whitespace is any non-empty string containing any the following characters:
 +Whitespace is any non-empty string containing only the following characters:
  
  - `U+0020` (space, `' '`)
  - `U+0009` (tab, `'\t'`)
@@@ -130,11 -130,6 +130,6 @@@ of tokens, that immediately and directl
  rather than referring to it by name or some other evaluation rule. A literal is
  a form of constant expression, so is evaluated (primarily) at compile time.
  
- The optional suffix is only used for certain numeric literals, but is
- reserved for future extension, that is, the above gives the lexical
- grammar, but a Rust parser will reject everything but the 12 special
- cases mentioned in [Number literals](#number-literals) below.
  #### Examples
  
  ##### Characters and strings
@@@ -1897,8 -1892,8 +1892,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