<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libsyntax/parse/parser.rs, 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>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>Move #[test_case] to a syntax extension</title>
<updated>2018-09-05T05:33:23+00:00</updated>
<author>
<name>John Renner</name>
<email>john@jrenner.net</email>
</author>
<published>2018-09-02T16:03:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0593dc7e3c9783f1c0bbbc8f017f9e914114e057'/>
<id>urn:sha1:0593dc7e3c9783f1c0bbbc8f017f9e914114e057</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace check() + bump() with eat()</title>
<updated>2018-09-02T06:19:28+00:00</updated>
<author>
<name>Seiichi Uchida</name>
<email>seuchida@gmail.com</email>
</author>
<published>2018-09-02T06:13:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=51dbb024f77a2a05921bdef7f07ee66831e48ad8'/>
<id>urn:sha1:51dbb024f77a2a05921bdef7f07ee66831e48ad8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #53815 - F001:if-let-guard, r=petrochenkov</title>
<updated>2018-09-01T20:31:29+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-09-01T20:31:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=28bcffead74d5e17c6cb1f7de432e37f93a6b50c'/>
<id>urn:sha1:28bcffead74d5e17c6cb1f7de432e37f93a6b50c</id>
<content type='text'>
refactor match guard

This is the first step to implement RFC 2294: if-let-guard. Tracking issue: https://github.com/rust-lang/rust/issues/51114

The second step should be introducing another variant `IfLet` in the Guard enum. I separated them into 2 PRs for the convenience of reviewers.

r? @petrochenkov
</content>
</entry>
<entry>
<title>Rollup merge of #53655 - jcpst:with_applicability, r=estebank</title>
<updated>2018-08-30T18:15:33+00:00</updated>
<author>
<name>Pietro Albini</name>
<email>pietro@pietroalbini.org</email>
</author>
<published>2018-08-30T18:15:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1535075b58bc725ea71dc0103bda5b840632e957'/>
<id>urn:sha1:1535075b58bc725ea71dc0103bda5b840632e957</id>
<content type='text'>
set applicability

Update a few more calls as described in #50723

r? @estebank
</content>
</entry>
<entry>
<title>introduce Guard enum</title>
<updated>2018-08-30T04:18:11+00:00</updated>
<author>
<name>F001</name>
<email>changchun.fan@qq.com</email>
</author>
<published>2018-08-30T04:18:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a083ca25f14833d704d2efba5ca9b431f6c65ad'/>
<id>urn:sha1:7a083ca25f14833d704d2efba5ca9b431f6c65ad</id>
<content type='text'>
</content>
</entry>
</feed>
