<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser, branch 1.62.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.62.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.62.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-05-11T09:43:27+00:00</updated>
<entry>
<title>ast: Introduce some traits to get AST node properties generically</title>
<updated>2022-05-11T09:43:27+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2022-05-01T17:58:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f2b7fa484739d3f7d1303c7d42138040caaf435e'/>
<id>urn:sha1:f2b7fa484739d3f7d1303c7d42138040caaf435e</id>
<content type='text'>
And use them to avoid constructing some artificial `Nonterminal` tokens during expansion
</content>
</entry>
<entry>
<title>Rollup merge of #96543 - nnethercote:rm-make_token_stream-hacks, r=Aaron1011</title>
<updated>2022-05-11T04:16:30+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>jtitor@2k36.org</email>
</author>
<published>2022-05-11T04:16:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=81c0a2d96c42bd3b21111ad7a99026949f4e9a4c'/>
<id>urn:sha1:81c0a2d96c42bd3b21111ad7a99026949f4e9a4c</id>
<content type='text'>
Remove hacks in `make_token_stream`.

`make_tokenstream` has three commented hacks, and a comment at the top
referring to #67062. These hacks have no observable effect, at least as judged
by running the test suite. The hacks were added in #82608, with an explanation
[here](https://github.com/rust-lang/rust/pull/82608#issuecomment-812877329). It
appears that one of the following is true: (a) they never did anything useful,
(b) they do something useful but we have no test coverage for them, or (c)
something has changed in the meantime that means they are no longer necessary.

This commit removes the hacks and the comments, in the hope that (b) is not
true.

r? `@Aaron1011`
</content>
</entry>
<entry>
<title>Remove some unnecessary invisible delimiter checks.</title>
<updated>2022-05-11T00:14:49+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2022-05-11T00:14:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3cd8e9866d55ddd962e6bda92018cbf4bc9ee08f'/>
<id>urn:sha1:3cd8e9866d55ddd962e6bda92018cbf4bc9ee08f</id>
<content type='text'>
These seem to have no useful effect... they don't seem useful from a
code inspection point of view, and they affect anything in the test
suite.
</content>
</entry>
<entry>
<title>Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors</title>
<updated>2022-05-07T06:30:29+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-05-07T06:30:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=574830f5730f2cfc3abdb486428d33d541c0abee'/>
<id>urn:sha1:574830f5730f2cfc3abdb486428d33d541c0abee</id>
<content type='text'>
Begin fixing all the broken doctests in `compiler/`

Begins to fix #95994.
All of them pass now but 24 of them I've marked with `ignore HELP (&lt;explanation&gt;)` (asking for help) as I'm unsure how to get them to work / if we should leave them as they are.
There are also a few that I marked `ignore` that could maybe be made to work but seem less important.
Each `ignore` has a rough "reason" for ignoring after it parentheses, with

- `(pseudo-rust)` meaning "mostly rust-like but contains foreign syntax"
- `(illustrative)` a somewhat catchall for either a fragment of rust that doesn't stand on its own (like a lone type), or abbreviated rust with ellipses and undeclared types that would get too cluttered if made compile-worthy.
- `(not-rust)` stuff that isn't rust but benefits from the syntax highlighting, like MIR.
- `(internal)` uses `rustc_*` code which would be difficult to make work with the testing setup.

Those reason notes are a bit inconsistently applied and messy though. If that's important I can go through them again and try a more principled approach. When I run `rg '```ignore \(' .` on the repo, there look to be lots of different conventions other people have used for this sort of thing. I could try unifying them all if that would be helpful.

I'm not sure if there was a better existing way to do this but I wrote my own script to help me run all the doctests and wade through the output. If that would be useful to anyone else, I put it here: https://github.com/Elliot-Roberts/rust_doctest_fixing_tool
</content>
</entry>
<entry>
<title>Auto merge of #96546 - nnethercote:overhaul-MacArgs, r=petrochenkov</title>
<updated>2022-05-04T21:16:28+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-05-04T21:16:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4c60a0ea5b2385d7400df9db1ad04e96f2a4c154'/>
<id>urn:sha1:4c60a0ea5b2385d7400df9db1ad04e96f2a4c154</id>
<content type='text'>
Overhaul `MacArgs`

Motivation:
- Clarify some code that I found hard to understand.
- Eliminate one use of three places where `TokenKind::Interpolated` values are created.

r? `@petrochenkov`
</content>
</entry>
<entry>
<title>Overhaul `MacArgs::Eq`.</title>
<updated>2022-05-04T21:06:12+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2022-04-28T20:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=99f5945f85342e1eff8d31507410ddd66ea94d64'/>
<id>urn:sha1:99f5945f85342e1eff8d31507410ddd66ea94d64</id>
<content type='text'>
The value in `MacArgs::Eq` is currently represented as a `Token`.
Because of `TokenKind::Interpolated`, `Token` can be either a token or
an arbitrary AST fragment. In practice, a `MacArgs::Eq` starts out as a
literal or macro call AST fragment, and then is later lowered to a
literal token. But this is very non-obvious. `Token` is a much more
general type than what is needed.

This commit restricts things, by introducing a new type `MacArgsEqKind`
that is either an AST expression (pre-lowering) or an AST literal
(post-lowering). The downside is that the code is a bit more verbose in
a few places. The benefit is that makes it much clearer what the
possibilities are (though also shorter in some other places). Also, it
removes one use of `TokenKind::Interpolated`, taking us a step closer to
removing that variant, which will let us make `Token` impl `Copy` and
remove many "handle Interpolated" code paths in the parser.

Things to note:
- Error messages have improved. Messages like this:
  ```
  unexpected token: `"bug" + "found"`
  ```
  now say "unexpected expression", which makes more sense. Although
  arbitrary expressions can exist within tokens thanks to
  `TokenKind::Interpolated`, that's not obvious to anyone who doesn't
  know compiler internals.
- In `parse_mac_args_common`, we no longer need to collect tokens for
  the value expression.
</content>
</entry>
<entry>
<title>fix most compiler/ doctests</title>
<updated>2022-05-03T00:40:30+00:00</updated>
<author>
<name>Elliot Roberts</name>
<email>Elliot0000101@gmail.com</email>
</author>
<published>2022-04-15T22:04:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7907385999b4a83d37ed31d334f3ed9ca02983a1'/>
<id>urn:sha1:7907385999b4a83d37ed31d334f3ed9ca02983a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix invalid keyword order for function declarations</title>
<updated>2022-05-02T09:14:43+00:00</updated>
<author>
<name>Ken Matsui</name>
<email>26405363+ken-matsui@users.noreply.github.com</email>
</author>
<published>2022-05-02T09:14:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef'/>
<id>urn:sha1:6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add `do yeet` expressions to allow experimentation in nightly</title>
<updated>2022-05-01T00:40:27+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2022-03-26T06:43:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e094ee5f102dfea8e99137d3818510cd178e8817'/>
<id>urn:sha1:e094ee5f102dfea8e99137d3818510cd178e8817</id>
<content type='text'>
Using an obviously-placeholder syntax.  An RFC would still be needed before this could have any chance at stabilization, and it might be removed at any point.

But I'd really like to have it in nightly at least to ensure it works well with try_trait_v2, especially as we refactor the traits.
</content>
</entry>
<entry>
<title>Save colon span to suggest bounds.</title>
<updated>2022-04-30T11:55:17+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2022-04-28T19:59:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74583852e8940f20d7c40c0dcc4d55697dee871b'/>
<id>urn:sha1:74583852e8940f20d7c40c0dcc4d55697dee871b</id>
<content type='text'>
</content>
</entry>
</feed>
