<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser/expr.rs, branch 1.63.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.63.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.63.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-06-14T03:53:48+00:00</updated>
<entry>
<title>Improve parsing errors and suggestions for bad if statements</title>
<updated>2022-06-14T03:53:48+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2022-05-28T04:58:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d1ba2d25d483a65f41ca6277c160e2ea6d813e3b'/>
<id>urn:sha1:d1ba2d25d483a65f41ca6277c160e2ea6d813e3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #95211 - terrarier2111:improve-parser, r=compiler-errors</title>
<updated>2022-06-13T22:47:22+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>jtitor@2k36.org</email>
</author>
<published>2022-06-13T22:47:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e3a3c00be805c265e5be3b478d76423371459c3b'/>
<id>urn:sha1:e3a3c00be805c265e5be3b478d76423371459c3b</id>
<content type='text'>
Improve parser diagnostics

This pr fixes https://github.com/rust-lang/rust/issues/93867 and contains a couple of diagnostics related changes to the parser.
Here is a short list with some of the changes:
- don't suggest the same thing that is the current token
- suggest removing the current token if the following token is one of the suggestions (maybe incorrect)
- tell the user to put a type or lifetime after where if there is none (as a warning)
- reduce the amount of tokens suggested (via the new eat_noexpect and check_noexpect methods)

If any of these changes are undesirable, i can remove them, thanks!
</content>
</entry>
<entry>
<title>remove unnecessary `to_string` and `String::new`</title>
<updated>2022-06-13T06:48:40+00:00</updated>
<author>
<name>Takayuki Maeda</name>
<email>takoyaki0316@gmail.com</email>
</author>
<published>2022-06-13T06:48:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=77d6176e69de8bcdc15a12402ce7245f06ca2329'/>
<id>urn:sha1:77d6176e69de8bcdc15a12402ce7245f06ca2329</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improves parser diagnostics, fixes #93867</title>
<updated>2022-06-12T15:48:52+00:00</updated>
<author>
<name>threadexception</name>
<email>hannes.gaumann@outlook.de</email>
</author>
<published>2022-05-01T17:05:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=21fdd549f63499a6f15160c22175cc9c3bbeb473'/>
<id>urn:sha1:21fdd549f63499a6f15160c22175cc9c3bbeb473</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Recover missing comma after match arm</title>
<updated>2022-06-07T09:19:51+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2022-06-07T09:19:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b13eb61a2cdfac1e094c2a4d608086f40cea5e01'/>
<id>urn:sha1:b13eb61a2cdfac1e094c2a4d608086f40cea5e01</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add spaces before and after expr in add {} suggestion</title>
<updated>2022-06-05T21:40:52+00:00</updated>
<author>
<name>Waffle Maybe</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-05T21:35:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4f85a73e516530844aecc44fb91d0db7604f7ac4'/>
<id>urn:sha1:4f85a73e516530844aecc44fb91d0db7604f7ac4</id>
<content type='text'>
Co-authored-by: Michael Goulet &lt;michael@errs.io&gt;
</content>
</entry>
<entry>
<title>Suggest removing label in `'label: non_block_expr`</title>
<updated>2022-06-05T19:34:11+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-05T19:34:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f06f05174581702e822f1d866a06e0a6a22d0b3d'/>
<id>urn:sha1:f06f05174581702e822f1d866a06e0a6a22d0b3d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not suggest adding labeled block if there are no labeled breaks</title>
<updated>2022-06-05T19:12:51+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-05T19:12:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c6e5bb32fbb3d0a85189e56086726c183f68ad0c'/>
<id>urn:sha1:c6e5bb32fbb3d0a85189e56086726c183f68ad0c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suggest adding `{}` for `'label: non_block_expr`</title>
<updated>2022-06-05T12:45:29+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-05T12:45:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f21c0a274ebfb35612359e32bee965afb09640d6'/>
<id>urn:sha1:f21c0a274ebfb35612359e32bee965afb09640d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #97166 - nnethercote:move-conditions-out, r=estebank</title>
<updated>2022-06-01T21:44:27+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>jtitor@2k36.org</email>
</author>
<published>2022-06-01T21:44:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d126de111bdf74cbcd20f043139af4f1e57b3cba'/>
<id>urn:sha1:d126de111bdf74cbcd20f043139af4f1e57b3cba</id>
<content type='text'>
Move conditions out of recover/report functions.

`Parser` has six recover/report functions that are passed a boolean, and
nothing is done if the boolean has a particular value.

This PR moves the tests outside the functions. This has the following effects.
- The number of lines of code goes down.
- Some `use` items become shorter.
- Avoids the strangeness whereby 11 out of 12 calls to
  `maybe_recover_from_bad_qpath` pass `true` as the second argument.
- Makes it clear at the call site that only one of
  `maybe_recover_from_bad_type_plus` and `maybe_report_ambiguous_plus` will be
  run.

r? `@estebank`
</content>
</entry>
</feed>
