<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser, branch 1.74.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.74.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.74.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-09-28T00:37:20+00:00</updated>
<entry>
<title>Tweak wording of missing angle backets in qualified path</title>
<updated>2023-09-28T00:37:20+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2023-09-28T00:37:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3848ffcee7ae74e15e4b68ad0f45a29f1fc170c7'/>
<id>urn:sha1:3848ffcee7ae74e15e4b68ad0f45a29f1fc170c7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #115677 - matthewjasper:let-expr-recovery, r=b-naber</title>
<updated>2023-09-14T19:56:55+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-09-14T19:56:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dac91a82e146d89fefe94dcbb53cd6c2662e354f'/>
<id>urn:sha1:dac91a82e146d89fefe94dcbb53cd6c2662e354f</id>
<content type='text'>
Improve invalid let expression handling

- Move all of the checks for valid let expression positions to parsing.
- Add a field to ExprKind::Let in AST/HIR to mark whether it's in a valid location.
- Suppress some later errors and MIR construction for invalid let expressions.
- Fix a (drop) scope issue that was also responsible for #104172.

Fixes #104172
Fixes #104868
</content>
</entry>
<entry>
<title>Address review comments</title>
<updated>2023-09-13T15:00:31+00:00</updated>
<author>
<name>Matthew Jasper</name>
<email>mjjasper1@gmail.com</email>
</author>
<published>2023-09-13T15:00:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e324a59eb6ba1a7883bf23ff42d425ca96960f2a'/>
<id>urn:sha1:e324a59eb6ba1a7883bf23ff42d425ca96960f2a</id>
<content type='text'>
- Add doc comment to new type
- Restore "only supported directly in conditions of `if` and `while` expressions" note
- Rename variant with clearer name
</content>
</entry>
<entry>
<title>Only suggest turbofish in patterns if we may recover</title>
<updated>2023-09-12T14:38:59+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2023-09-12T14:30:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ed77e98fa9e9a03940b55b0bbc10615b446f299'/>
<id>urn:sha1:3ed77e98fa9e9a03940b55b0bbc10615b446f299</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reduce double errors for invalid let expressions</title>
<updated>2023-09-11T16:17:06+00:00</updated>
<author>
<name>Matthew Jasper</name>
<email>mjjasper1@gmail.com</email>
</author>
<published>2023-09-11T16:16:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b011a0a13b4354080b3add0bb3f4445ddb8fd13b'/>
<id>urn:sha1:b011a0a13b4354080b3add0bb3f4445ddb8fd13b</id>
<content type='text'>
Previously some invalid let expressions would result in both a feature
error and a parsing error. Avoid this and ensure that we only emit the
parsing error when this happens.
</content>
</entry>
<entry>
<title>Move let expression checking to parsing</title>
<updated>2023-09-11T15:51:18+00:00</updated>
<author>
<name>Matthew Jasper</name>
<email>mjjasper1@gmail.com</email>
</author>
<published>2023-09-08T10:14:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=333388fd3c9fa03362a3c2a2675ab521c4ddb1ff'/>
<id>urn:sha1:333388fd3c9fa03362a3c2a2675ab521c4ddb1ff</id>
<content type='text'>
There was an incomplete version of the check in parsing and a second
version in AST validation. This meant that some, but not all, invalid
uses were allowed inside macros/disabled cfgs. It also means that later
passes have a hard time knowing when the let expression is in a valid
location, sometimes causing ICEs.

- Add a field to ExprKind::Let in AST/HIR to mark whether it's in a
  valid location.
- Suppress later errors and MIR construction for invalid let
  expressions.
</content>
</entry>
<entry>
<title>Rollup merge of #115596 - nnethercote:two-small-changes, r=lqd</title>
<updated>2023-09-06T17:31:50+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-09-06T17:31:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=da44234b647115d9056622ef786fe875d1bb684d'/>
<id>urn:sha1:da44234b647115d9056622ef786fe875d1bb684d</id>
<content type='text'>
A small change

A small change I made while poking around the code.

r? `@lqd`
</content>
</entry>
<entry>
<title>Rollup merge of #115473 - gurry:113110-expected-item, r=compiler-errors</title>
<updated>2023-09-06T17:31:48+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-09-06T17:31:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4a31cc859b376b853ab40961c26b99136a6a1e61'/>
<id>urn:sha1:4a31cc859b376b853ab40961c26b99136a6a1e61</id>
<content type='text'>
Add explanatory note to 'expected item' error

Fixes #113110

It changes the diagnostic from this:

```
error: expected item, found `5`
 --&gt; ../test.rs:1:1
  |
1 | 5
  | ^ expected item
 ```
to this:
```
error: expected item, found `5`
 --&gt; ../test.rs:1:1
  |
1 | 5
  | ^ expected item
  |
  = note: items are things that can appear at the root of a module
  = note: for a full list see https://doc.rust-lang.org/reference/items.html
```
</content>
</entry>
<entry>
<title>Adjust `to_attr_token_stream`.</title>
<updated>2023-09-06T07:12:07+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-09-06T06:45:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=42dbc72d7bb0645292d72816d768d1f5365a58ca'/>
<id>urn:sha1:42dbc72d7bb0645292d72816d768d1f5365a58ca</id>
<content type='text'>
It uses `once` chained with `(0..self.num_calls).map(...)` followed by
`.take(self.num_calls`. I found this hard to read. It's simpler to just
use `repeat_with`.
</content>
</entry>
<entry>
<title>Add explanatory note to 'expected item' error</title>
<updated>2023-09-06T03:35:07+00:00</updated>
<author>
<name>Gurinder Singh</name>
<email>gurinder.singh@1e.com</email>
</author>
<published>2023-09-06T03:35:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a286e775c51efb5f05bb98ed2df6b9a974574ad'/>
<id>urn:sha1:6a286e775c51efb5f05bb98ed2df6b9a974574ad</id>
<content type='text'>
</content>
</entry>
</feed>
