<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_ast/src/token.rs, branch cargo_update</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=cargo_update</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=cargo_update'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-02T14:38:31+00:00</updated>
<entry>
<title>Remove special implementation of `PartialEq` for `InvisibleOrigin` outside macro matching</title>
<updated>2025-09-02T14:38:31+00:00</updated>
<author>
<name>Jakub Beránek</name>
<email>berykubik@gmail.com</email>
</author>
<published>2025-09-01T13:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a8537ab84bf7fd14b2445a058075dac764932e47'/>
<id>urn:sha1:a8537ab84bf7fd14b2445a058075dac764932e47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>print raw lifetime idents with `r#`</title>
<updated>2025-08-22T04:58:37+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2025-08-04T09:41:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e5b5ba1e732d557f00a3cd79150990370c7db0a'/>
<id>urn:sha1:1e5b5ba1e732d557f00a3cd79150990370c7db0a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Ident::is_non_reserved_ident</title>
<updated>2025-06-26T18:11:14+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2025-06-26T17:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=94e9973b92c481d20e5fe1466bbc47f818101d5f'/>
<id>urn:sha1:94e9973b92c481d20e5fe1466bbc47f818101d5f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mbe: Clean up code with non-optional `NonterminalKind`</title>
<updated>2025-06-24T08:37:36+00:00</updated>
<author>
<name>Trevor Gross</name>
<email>tmgross@umich.edu</email>
</author>
<published>2025-06-18T02:15:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b9e9be38c01104dd7e1a23995ef89995357bd35b'/>
<id>urn:sha1:b9e9be38c01104dd7e1a23995ef89995357bd35b</id>
<content type='text'>
Since [1], the fragment specifier is unconditionally required in all
editions. This means `NonTerminalKind` no longer needs to be optional,
as we can reject this code during the expansion of `macro_rules!` rather
than handling it throughout the code. Do this cleanup here.

[1]: https://github.com/rust-lang/rust/pull/128425
</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>Remove `TokenStream::flattened` and `InvisibleOrigin::FlattenToken`.</title>
<updated>2025-04-02T05:16:51+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-07-04T00:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4c0cbaeb9e799362dd081ff8514f75e23ab8c2f5'/>
<id>urn:sha1:4c0cbaeb9e799362dd081ff8514f75e23ab8c2f5</id>
<content type='text'>
They are no longer needed.

This does slightly worsen the error message for a single test, but that
test contains code that is so badly broken that I'm not worried about
it.
</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>Remove `NtBlock`, `Nonterminal`, and `TokenKind::Interpolated`.</title>
<updated>2025-04-02T05:07:02+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-04-18T10:18:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bb495d6d3e6dae294f08162097bd85f904e9f90b'/>
<id>urn:sha1:bb495d6d3e6dae294f08162097bd85f904e9f90b</id>
<content type='text'>
`NtBlock` is the last remaining variant of `Nonterminal`, so once it is
gone then `Nonterminal` can be removed as well.
</content>
</entry>
<entry>
<title>Remove `Token::uninterpolated_span`.</title>
<updated>2025-04-01T19:21:16+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-03-26T04:54:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d59b17c5cdbf345d0088d90fc03faf2501a39757'/>
<id>urn:sha1:d59b17c5cdbf345d0088d90fc03faf2501a39757</id>
<content type='text'>
In favour of the similar method on `Parser`, which works on things
other than identifiers and lifetimes.
</content>
</entry>
<entry>
<title>Remove `NtExpr` and `NtLiteral`.</title>
<updated>2025-04-01T19:20:35+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-04-18T11:31:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=49ed25b5d2d5dc88f9fa3e268d9bd210acc875de'/>
<id>urn:sha1:49ed25b5d2d5dc88f9fa3e268d9bd210acc875de</id>
<content type='text'>
Notes about tests:
- tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs: some messages are
  now duplicated due to repeated parsing.

- tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.rs: ditto.

- `tests/ui/proc-macro/macro-rules-derive-cfg.rs`: the diff looks large
  but the only difference is the insertion of a single
  invisible-delimited group around a metavar.

- `tests/ui/attributes/nonterminal-expansion.rs`: a slight span
  degradation, somehow related to the recent massive attr parsing
  rewrite (#135726). I couldn't work out exactly what is going wrong,
  but I don't think it's worth holding things up for a single slightly
  suboptimal error message.
</content>
</entry>
</feed>
