<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser, branch 1.49.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.49.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.49.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-12-27T17:26:00+00:00</updated>
<entry>
<title>Don't allow `const` to begin a nonterminal</title>
<updated>2020-12-27T17:26:00+00:00</updated>
<author>
<name>Camelid</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2020-12-17T21:51:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=acc2154a7c3d842a82a19867e9070989748d2667'/>
<id>urn:sha1:acc2154a7c3d842a82a19867e9070989748d2667</id>
<content type='text'>
Thanks to Vadim Petrochenkov who [told me what the fix was][z]!

[z]: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/finding.20which.20macro.20rule.20to.20use/near/220240422
</content>
</entry>
<entry>
<title>Rollup merge of #78836 - fanzier:struct-and-slice-destructuring, r=petrochenkov</title>
<updated>2020-11-12T18:46:09+00:00</updated>
<author>
<name>Mara Bos</name>
<email>m-ou.se@m-ou.se</email>
</author>
<published>2020-11-12T18:46:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=755dd14e00fd9007a67779b129e81b47c6435113'/>
<id>urn:sha1:755dd14e00fd9007a67779b129e81b47c6435113</id>
<content type='text'>
Implement destructuring assignment for structs and slices

This is the second step towards implementing destructuring assignment (RFC: rust-lang/rfcs#2909, tracking issue: #71126). This PR is the second part of #71156, which was split up to allow for easier review.

Note that the first PR (#78748) is not merged yet, so it is included as the first commit in this one. I thought this would allow the review to start earlier because I have some time this weekend to respond to reviews. If ``@petrochenkov`` prefers to wait until the first PR is merged, I totally understand, of course.

This PR implements destructuring assignment for (tuple) structs and slices. In order to do this, the following *parser change* was necessary: struct expressions are not required to have a base expression, i.e. `Struct { a: 1, .. }` becomes legal (in order to act like a struct pattern).

Unfortunately, this PR slightly regresses the diagnostics implemented in #77283. However, it is only a missing help message in `src/test/ui/issues/issue-77218.rs`. Other instances of this diagnostic are not affected. Since I don't exactly understand how this help message works and how to fix it yet, I was hoping it's OK to regress this temporarily and fix it in a follow-up PR.

Thanks to ``@varkor`` who helped with the implementation, particularly around the struct rest changes.

r? ``@petrochenkov``
</content>
</entry>
<entry>
<title>Auto merge of #78782 - petrochenkov:nodoctok, r=Aaron1011</title>
<updated>2020-11-12T00:33:55+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2020-11-12T00:33:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5a6a41e7847ff5f85a31b87431ce2af29c567f1d'/>
<id>urn:sha1:5a6a41e7847ff5f85a31b87431ce2af29c567f1d</id>
<content type='text'>
Do not collect tokens for doc comments

Doc comment is a single token and AST has all the information to re-create it precisely.
Doc comments are also responsible for majority of calls to `collect_tokens` (with `num_calls == 1` and `num_calls == 0`, cc https://github.com/rust-lang/rust/pull/78736).

(I also moved token collection into `fn parse_attribute` to deduplicate code a bit.)

r? `@Aaron1011`
</content>
</entry>
<entry>
<title>Implement destructuring assignment for structs and slices</title>
<updated>2020-11-11T12:10:52+00:00</updated>
<author>
<name>Fabian Zaiser</name>
<email>fabian.zaiser@gmail.com</email>
</author>
<published>2020-11-07T14:28:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=de84ad95b4b097e504171c7c606bf3715803c13b'/>
<id>urn:sha1:de84ad95b4b097e504171c7c606bf3715803c13b</id>
<content type='text'>
Co-authored-by: varkor &lt;github@varkor.com&gt;
</content>
</entry>
<entry>
<title>Rollup merge of #78710 - petrochenkov:macvisit, r=davidtwco</title>
<updated>2020-11-09T18:06:55+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>dylan.dpc@gmail.com</email>
</author>
<published>2020-11-09T18:06:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8ebca242bc6797647147b1c178f0620f867710ac'/>
<id>urn:sha1:8ebca242bc6797647147b1c178f0620f867710ac</id>
<content type='text'>
rustc_ast: Do not panic by default when visiting macro calls

Panicking by default made sense when we didn't have HIR or MIR and everything worked on AST, but now all AST visitors run early and majority of them have to deal with macro calls, often by ignoring them.

The second commit renames `visit_mac` to `visit_mac_call`, the corresponding structures were renamed earlier in https://github.com/rust-lang/rust/pull/69589.
</content>
</entry>
<entry>
<title>Do not collect tokens for doc comments</title>
<updated>2020-11-08T22:47:11+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-11-05T17:27:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=12de1e8985016865ed6baa2262865336bbfdaa75'/>
<id>urn:sha1:12de1e8985016865ed6baa2262865336bbfdaa75</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_ast: `visit_mac` -&gt; `visit_mac_call`</title>
<updated>2020-11-03T20:39:51+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-11-03T17:34:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90fafc8c8ff680fc631a44230d8352d7911e70f2'/>
<id>urn:sha1:90fafc8c8ff680fc631a44230d8352d7911e70f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_ast: Do not panic by default when visiting macro calls</title>
<updated>2020-11-03T17:38:20+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-11-03T17:26:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3237b3886c8d1bd19b78eda6040e2c55e5332a82'/>
<id>urn:sha1:3237b3886c8d1bd19b78eda6040e2c55e5332a82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use reparsed `TokenStream` if we captured any inner attributes</title>
<updated>2020-11-02T18:22:03+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-11-02T18:22:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=22383b32b8a79409e5801e0d9c469da71f10ad47'/>
<id>urn:sha1:22383b32b8a79409e5801e0d9c469da71f10ad47</id>
<content type='text'>
Fixes #78675

We now bail out of `prepend_attrs` if we ended up capturing any inner
attributes (which can happen in several places, due to token capturing
for `macro_rules!` arguments.
</content>
</entry>
<entry>
<title>parser: Cleanup `LazyTokenStream` and avoid some clones</title>
<updated>2020-10-30T22:56:34+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2020-10-30T21:40:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d0c63bccc5f5214fb0defb974dfe75a2ea3ef6cb'/>
<id>urn:sha1:d0c63bccc5f5214fb0defb974dfe75a2ea3ef6cb</id>
<content type='text'>
by using a named struct instead of a closure.
</content>
</entry>
</feed>
