<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser/attr_wrapper.rs, branch 1.89.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.89.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.89.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-29T21:12:09+00:00</updated>
<entry>
<title>Use `ThinVec` to shrink `LazyAttrTokenStreamInner`.</title>
<updated>2025-04-29T21:12:09+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-29T02:05:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=880e6f716d741b4ef827d48e66c45c7887f82aa2'/>
<id>urn:sha1:880e6f716d741b4ef827d48e66c45c7887f82aa2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify `LazyAttrTokenStream`.</title>
<updated>2025-04-29T21:10:56+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-29T01:57:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=298c56f4ba604d3c7025a44fe7bfe1134d6b56d6'/>
<id>urn:sha1:298c56f4ba604d3c7025a44fe7bfe1134d6b56d6</id>
<content type='text'>
This commit does the following.
- Changes it from `Lrc&lt;Box&lt;dyn ToAttrTokenStream&gt;&gt;` to
  `Lrc&lt;LazyAttrTokenStreamInner&gt;`.
- Reworks `LazyAttrTokenStreamImpl` as `LazyAttrTokenStreamInner`, which
  is a two-variant enum.
- Removes the `ToAttrTokenStream` trait and the two impls of it.

The recursion limit must be increased in some crates otherwise rustdoc
aborts.
</content>
</entry>
<entry>
<title>Move various token stream things from `rustc_parse` to `rustc_ast`.</title>
<updated>2025-04-29T02:14:27+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-29T01:18:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=28236ab703d21483dc818108f157fbb2da5a2802'/>
<id>urn:sha1:28236ab703d21483dc818108f157fbb2da5a2802</id>
<content type='text'>
Specifically: `TokenCursor`, `TokenTreeCursor`,
`LazyAttrTokenStreamImpl`, `FlatToken`, `make_attr_token_stream`,
`ParserRange`, `NodeRange`. `ParserReplacement`, and `NodeReplacement`.
These are all related to token streams, rather than actual parsing.

This will facilitate the simplifications in the next commit.
</content>
</entry>
<entry>
<title>Remove `token::{Open,Close}Delim`.</title>
<updated>2025-04-20T21:35:56+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-16T06:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bf8ce32558a4657d077a6761eaa293d0645c2e16'/>
<id>urn:sha1:bf8ce32558a4657d077a6761eaa293d0645c2e16</id>
<content type='text'>
By replacing them with `{Open,Close}{Param,Brace,Bracket,Invisible}`.

PR #137902 made `ast::TokenKind` more like `lexer::TokenKind` by
replacing the compound `BinOp{,Eq}(BinOpToken)` variants with fieldless
variants `Plus`, `Minus`, `Star`, etc. This commit does a similar thing
with delimiters. It also makes `ast::TokenKind` more similar to
`parser::TokenType`.

This requires a few new methods:
- `TokenKind::is_{,open_,close_}delim()` replace various kinds of
  pattern matches.
- `Delimiter::as_{open,close}_token_kind` are used to convert
  `Delimiter` values to `TokenKind`.

Despite these additions, it's a net reduction in lines of code. This is
because e.g. `token::OpenParen` is so much shorter than
`token::OpenDelim(Delimiter::Parenthesis)` that many multi-line forms
reduce to single line forms. And many places where the number of lines
doesn't change are still easier to read, just because the names are
shorter, e.g.:
```
-   } else if self.token != token::CloseDelim(Delimiter::Brace) {
+   } else if self.token != token::CloseBrace {
```
</content>
</entry>
<entry>
<title>Impl `Copy` for `Token` and `TokenKind`.</title>
<updated>2025-04-02T05:16:49+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-05-15T23:22:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4d8f7577b5f2f7c72d1e258c07b882d0afcf0956'/>
<id>urn:sha1:4d8f7577b5f2f7c72d1e258c07b882d0afcf0956</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rustfmt</title>
<updated>2025-02-08T22:12:13+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2025-02-08T22:12:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1fcae03369abb4c2cc180cd5a49e1f4440a81300'/>
<id>urn:sha1:1fcae03369abb4c2cc180cd5a49e1f4440a81300</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce `InvisibleOrigin` on invisible delimiters.</title>
<updated>2024-11-20T21:16:54+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-04-16T23:59:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=afe238f66fc9348b8c4a1daacefb93c0ec36296a'/>
<id>urn:sha1:afe238f66fc9348b8c4a1daacefb93c0ec36296a</id>
<content type='text'>
It's not used meaningfully yet, but will be needed to get rid of
interpolated tokens.
</content>
</entry>
<entry>
<title>Revert "Avoid nested replacement ranges" from #129346.</title>
<updated>2024-11-04T04:57:35+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-11-04T04:41:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=981dc02eaf876a25b95581411e841ba664dc9e97'/>
<id>urn:sha1:981dc02eaf876a25b95581411e841ba664dc9e97</id>
<content type='text'>
It caused a test regression in the `cfg_eval.rs` crate. (The bugfix
in #129346 was in a different commit; this commit was just a code
simplification.)
</content>
</entry>
<entry>
<title>Rollup merge of #130551 - nnethercote:fix-break-last-token, r=petrochenkov</title>
<updated>2024-09-23T14:54:44+00:00</updated>
<author>
<name>Jubilee</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2024-09-23T14:54:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=515bdcda01fb56609600d2f6214a382511046341'/>
<id>urn:sha1:515bdcda01fb56609600d2f6214a382511046341</id>
<content type='text'>
Fix `break_last_token`.

It currently doesn't handle the three-char tokens `&gt;&gt;=` and `&lt;&lt;=` correctly. These can be broken twice, resulting in three individual tokens. This is a latent bug that currently doesn't cause any problems, but does cause problems for #124141, because that PR increases the usage of lazy token streams.

r? `@petrochenkov`
</content>
</entry>
<entry>
<title>Fix `break_last_token`.</title>
<updated>2024-09-22T23:14:30+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-09-19T09:32:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=73cc5751773d4c49cc9d938548762520037926ba'/>
<id>urn:sha1:73cc5751773d4c49cc9d938548762520037926ba</id>
<content type='text'>
It currently doesn't handle the three-char tokens `&gt;&gt;=` and `&lt;&lt;=`
correctly. These can be broken twice, resulting in three individual
tokens. This is a latent bug that currently doesn't cause any problems,
but does cause problems for #124141, because that PR increases the usage
of lazy token streams.
</content>
</entry>
</feed>
