<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libsyntax/parse, branch 1.30.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.30.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.30.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-09-14T23:05:32+00:00</updated>
<entry>
<title>issue 54109: use short suggestions</title>
<updated>2018-09-14T23:05:32+00:00</updated>
<author>
<name>Vitaly _Vi Shukela</name>
<email>vi0oss@gmail.com</email>
</author>
<published>2018-09-14T23:05:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bc63a4a13a442e1844bb5577adcc464c2a6bfd21'/>
<id>urn:sha1:bc63a4a13a442e1844bb5577adcc464c2a6bfd21</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use span_suggestion_with_applicability for "and/or" hinter</title>
<updated>2018-09-13T17:44:07+00:00</updated>
<author>
<name>Vitaly _Vi Shukela</name>
<email>vi0oss@gmail.com</email>
</author>
<published>2018-09-13T17:40:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=acc44e40ccd860a3cae54c7b56956c3c1340182e'/>
<id>urn:sha1:acc44e40ccd860a3cae54c7b56956c3c1340182e</id>
<content type='text'>
Advised by @estebank.
</content>
</entry>
<entry>
<title>Suggest &amp;&amp; and || instead of 'and' and 'or'</title>
<updated>2018-09-13T12:54:12+00:00</updated>
<author>
<name>Vitaly _Vi Shukela</name>
<email>vi0oss@gmail.com</email>
</author>
<published>2018-09-13T12:54:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=636f518aac7430406dcb410cd7e46b4a217c265c'/>
<id>urn:sha1:636f518aac7430406dcb410cd7e46b4a217c265c</id>
<content type='text'>
Closes #54109.
</content>
</entry>
<entry>
<title>Don't compute padding of braces unless they are unmatched</title>
<updated>2018-09-09T21:55:46+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2018-09-09T21:55:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=014a56ca9c0ad4b0ab1e377a66236242b4329413'/>
<id>urn:sha1:014a56ca9c0ad4b0ab1e377a66236242b4329413</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #53902 - dtolnay:group, r=petrochenkov</title>
<updated>2018-09-09T13:27:44+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-09-09T13:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=40fc8ba5f95125f307ef17f11ec02b3f5fdad562'/>
<id>urn:sha1:40fc8ba5f95125f307ef17f11ec02b3f5fdad562</id>
<content type='text'>
proc_macro::Group::span_open and span_close

Before this addition, every delimited group like `(`...`)` `[`...`]` `{`...`}` has only a single Span that covers the full source location from opening delimiter to closing delimiter. This makes it impossible for a procedural macro to trigger an error pointing to just the opening or closing delimiter. The Rust compiler does not seem to have the same limitation:

```rust
mod m {
    type T =
}
```

```console
error: expected type, found `}`
 --&gt; src/main.rs:3:1
  |
3 | }
  | ^
```

On that same input, a procedural macro would be forced to trigger the error on the last token inside the block, on the entire block, or on the next token after the block, none of which is really what you want for an error like above.

This commit adds `group.span_open()` and `group.span_close()` which access the Span associated with just the opening delimiter and just the closing delimiter of the group. Relevant to Syn as we implement real error messages for when parsing fails in a procedural macro: https://github.com/dtolnay/syn/issues/476.

```diff
  impl Group {
      fn span(&amp;self) -&gt; Span;
+     fn span_open(&amp;self) -&gt; Span;
+     fn span_close(&amp;self) -&gt; Span;
  }
```

Fixes #48187
r? @alexcrichton
</content>
</entry>
<entry>
<title>Track distinct spans for open and close delimiter</title>
<updated>2018-09-09T02:01:48+00:00</updated>
<author>
<name>David Tolnay</name>
<email>dtolnay@gmail.com</email>
</author>
<published>2018-09-09T01:07:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a1dd39e724c2a37f08f534e90ced134d38a49417'/>
<id>urn:sha1:a1dd39e724c2a37f08f534e90ced134d38a49417</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #53949 - estebank:unclosed-delim, r=nikomatsakis</title>
<updated>2018-09-09T01:36:58+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-09-09T01:36:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=004bc5a33cd44cd0896cae917a75488579126da5'/>
<id>urn:sha1:004bc5a33cd44cd0896cae917a75488579126da5</id>
<content type='text'>
Improve messages for un-closed delimiter errors
</content>
</entry>
<entry>
<title>Change wording of unclosed delimiter label</title>
<updated>2018-09-05T14:33:29+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2018-09-05T14:33:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3192d3dc0c4417a6e360018b341c07d32f3f3d7f'/>
<id>urn:sha1:3192d3dc0c4417a6e360018b341c07d32f3f3d7f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide more context for unenclosed delimiters</title>
<updated>2018-09-05T10:43:24+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2018-09-04T15:09:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=008aa5a24e152691d852bd9f0a2990b6e4377397'/>
<id>urn:sha1:008aa5a24e152691d852bd9f0a2990b6e4377397</id>
<content type='text'>
 * When encountering EOF, point at the last opening brace that does not
   have the same indentation level as its close delimiter.
 * When encountering the wrong type of close delimiter, point at the
   likely correct open delimiter to give a better idea of what went
   wrong.
</content>
</entry>
<entry>
<title>Reword un-closed delimiter label</title>
<updated>2018-09-05T10:43:24+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2018-08-27T00:22:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5238b523c3959e33add469af77b2ffa5a60b4cf6'/>
<id>urn:sha1:5238b523c3959e33add469af77b2ffa5a60b4cf6</id>
<content type='text'>
</content>
</entry>
</feed>
