<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser/expr.rs, branch 1.55.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.55.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.55.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-07-18T05:58:16+00:00</updated>
<entry>
<title>Auto merge of #87071 - inquisitivecrystal:inclusive-range, r=estebank</title>
<updated>2021-07-18T05:58:16+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-07-18T05:58:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ab6b60337edeb49339d173853fee1f8569421e0'/>
<id>urn:sha1:3ab6b60337edeb49339d173853fee1f8569421e0</id>
<content type='text'>
Add diagnostics for mistyped inclusive range

Inclusive ranges are correctly typed as `..=`. However, it's quite easy to think of it as being like `==`, and type `..==` instead. This PR adds helpful diagnostics for this case.

Resolves #86395 (there are some other cases there, but I think those should probably have separate issues).

r? `@estebank`
</content>
</entry>
<entry>
<title>Suggest a path separator if a stray colon is found in a match arm</title>
<updated>2021-07-13T23:15:59+00:00</updated>
<author>
<name>Fabian Wolff</name>
<email>fabian.wolff@alumni.ethz.ch</email>
</author>
<published>2021-07-13T11:18:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=23624504250058c36f42fe3eb76300da962e393b'/>
<id>urn:sha1:23624504250058c36f42fe3eb76300da962e393b</id>
<content type='text'>
Co-authored-by: Esteban Kuber &lt;estebank@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>Give a helpful error for the mistake `..==`</title>
<updated>2021-07-11T23:51:32+00:00</updated>
<author>
<name>Aris Merchant</name>
<email>22333129+inquisitivecrystal@users.noreply.github.com</email>
</author>
<published>2021-06-26T02:46:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fd406a8865d601572ac0252ea57965e8b784de28'/>
<id>urn:sha1:fd406a8865d601572ac0252ea57965e8b784de28</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #85193 - pnkfelix:readd-support-for-inner-attrs-within-match, r=nikomatsakis</title>
<updated>2021-06-22T21:17:12+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-06-22T21:17:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a758ea7e48416b968955535094479dc2e7cc9e1'/>
<id>urn:sha1:6a758ea7e48416b968955535094479dc2e7cc9e1</id>
<content type='text'>
Re-add support for parsing (and pretty-printing) inner-attributes in match body

Re-add support for parsing (and pretty-printing) inner-attributes within body of a `match`.

In other words, we can do `match EXPR { #![inner_attr] ARM_1 ARM_2 ... }` again.

I believe this unbreaks the only four crates that crater flagged as broken by PR #83312.

(I am putting this up so that the lang-team can check it out and decide whether it changes their mind about what to do regarding PR #83312.)
</content>
</entry>
<entry>
<title>Use `AttrVec` for `Arm`, `FieldDef`, and `Variant`</title>
<updated>2021-06-16T23:04:54+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>yuki.okushi@huawei.com</email>
</author>
<published>2021-06-16T22:11:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4f8e0ebcc58613b1095a9f47753547698b0b34fa'/>
<id>urn:sha1:4f8e0ebcc58613b1095a9f47753547698b0b34fa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for using qualified paths with structs in expression and pattern</title>
<updated>2021-06-10T11:18:41+00:00</updated>
<author>
<name>Ryan Levick</name>
<email>ryan.levick@gmail.com</email>
</author>
<published>2020-12-10T12:20:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=69363492337fa5280d8242f8b68de9a4b60a8b55'/>
<id>urn:sha1:69363492337fa5280d8242f8b68de9a4b60a8b55</id>
<content type='text'>
position.
</content>
</entry>
<entry>
<title>parser: Ensure that all nonterminals have tokens after parsing</title>
<updated>2021-06-06T11:21:12+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2021-05-06T13:21:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cbdfa1edcaab0dc86b5f9696dea790403bcb0f19'/>
<id>urn:sha1:cbdfa1edcaab0dc86b5f9696dea790403bcb0f19</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Re-add support for parsing (and pretty-printing) inner-attributes within body of a `match`.</title>
<updated>2021-05-11T19:18:09+00:00</updated>
<author>
<name>Felix S. Klock II</name>
<email>pnkfelix@pnkfx.org</email>
</author>
<published>2021-05-11T19:18:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=75d62931280ae8f2ad26b2812e151f8f49de407a'/>
<id>urn:sha1:75d62931280ae8f2ad26b2812e151f8f49de407a</id>
<content type='text'>
In other words, we can do `match EXPR { #![inner_attr] ARM_1 ARM_2 ... }` again.

I believe this unbreaks the only four crates that crater flagged as broken by PR 83312.

(I am putting this up so that the lang-team can check it out and decide whether
it changes their mind about what to do regarding PR 83312.)
</content>
</entry>
<entry>
<title>parser: Remove support for inner attributes on non-block expressions</title>
<updated>2021-05-03T10:33:53+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2021-03-19T23:52:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1443c7646d37eb69c434268ec8b27cd0cf82d9f2'/>
<id>urn:sha1:1443c7646d37eb69c434268ec8b27cd0cf82d9f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement token-based handling of attributes during expansion</title>
<updated>2021-04-11T05:31:36+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-11-28T23:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a93c4f05de5c5cdd8158e23de7c3cf86a548447f'/>
<id>urn:sha1:a93c4f05de5c5cdd8158e23de7c3cf86a548447f</id>
<content type='text'>
This PR modifies the macro expansion infrastructure to handle attributes
in a fully token-based manner. As a result:

* Derives macros no longer lose spans when their input is modified
  by eager cfg-expansion. This is accomplished by performing eager
  cfg-expansion on the token stream that we pass to the derive
  proc-macro
* Inner attributes now preserve spans in all cases, including when we
  have multiple inner attributes in a row.

This is accomplished through the following changes:

* New structs `AttrAnnotatedTokenStream` and `AttrAnnotatedTokenTree` are introduced.
  These are very similar to a normal `TokenTree`, but they also track
  the position of attributes and attribute targets within the stream.
  They are built when we collect tokens during parsing.
  An `AttrAnnotatedTokenStream` is converted to a regular `TokenStream` when
  we invoke a macro.
* Token capturing and `LazyTokenStream` are modified to work with
  `AttrAnnotatedTokenStream`. A new `ReplaceRange` type is introduced, which
  is created during the parsing of a nested AST node to make the 'outer'
  AST node aware of the attributes and attribute target stored deeper in the token stream.
* When we need to perform eager cfg-expansion (either due to `#[derive]` or `#[cfg_eval]`),
we tokenize and reparse our target, capturing additional information about the locations of
`#[cfg]` and `#[cfg_attr]` attributes at any depth within the target.
This is a performance optimization, allowing us to perform less work
in the typical case where captured tokens never have eager cfg-expansion run.
</content>
</entry>
</feed>
