<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_ast/src/attr, branch try-perf</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try-perf</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try-perf'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-09T07:47:01+00:00</updated>
<entry>
<title>remove `P`</title>
<updated>2025-08-09T07:47:01+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2025-08-09T05:24:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ad1113f87ef828b300ebb8fca397efd358580da3'/>
<id>urn:sha1:ad1113f87ef828b300ebb8fca397efd358580da3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Port `#[automatically_derived]` to the new attribute parsing infrastructure</title>
<updated>2025-07-12T15:48:50+00:00</updated>
<author>
<name>Jonathan Brouwer</name>
<email>jonathantbrouwer@gmail.com</email>
</author>
<published>2025-07-11T10:01:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ef82007ed7b7833e3efdec0d80712849048c5c1f'/>
<id>urn:sha1:ef82007ed7b7833e3efdec0d80712849048c5c1f</id>
<content type='text'>
Signed-off-by: Jonathan Brouwer &lt;jonathantbrouwer@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove style() from AttributeExt trait</title>
<updated>2025-06-21T18:09:13+00:00</updated>
<author>
<name>David Tolnay</name>
<email>dtolnay@gmail.com</email>
</author>
<published>2025-06-20T18:52:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=86f40acce3ba62845642fb972e5a28191eb27c8a'/>
<id>urn:sha1:86f40acce3ba62845642fb972e5a28191eb27c8a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add AttributeExt::doc_resolution_scope</title>
<updated>2025-06-21T18:09:12+00:00</updated>
<author>
<name>David Tolnay</name>
<email>dtolnay@gmail.com</email>
</author>
<published>2025-06-20T18:49:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e51c37c34c3f576a2e1b7b3d5f0bd5d993c87d24'/>
<id>urn:sha1:e51c37c34c3f576a2e1b7b3d5f0bd5d993c87d24</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reduce `P&lt;T&gt;` to a typedef of `Box&lt;T&gt;`.</title>
<updated>2025-05-27T03:29:24+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-05-26T16:32:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=991c91fdaa5862835799abfd9c2349e06277097e'/>
<id>urn:sha1:991c91fdaa5862835799abfd9c2349e06277097e</id>
<content type='text'>
Keep the `P` constructor function for now, to minimize immediate churn.

All the `into_inner` calls are removed, which is nice.
</content>
</entry>
<entry>
<title>Auto merge of #139897 - nnethercote:rm-OpenDelim-CloseDelim, r=petrochenkov</title>
<updated>2025-04-22T01:15:06+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-04-22T01:15:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fae7785b60ea7fe1ad293352c057a5b7be73d245'/>
<id>urn:sha1:fae7785b60ea7fe1ad293352c057a5b7be73d245</id>
<content type='text'>
Remove `token::{Open,Close}Delim`

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 {
```

r? `@petrochenkov`
</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>Replace infallible `name_or_empty` methods with fallible `name` methods.</title>
<updated>2025-04-16T23:50:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-10T04:33:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2fef0a30ae6b2687dfb286cb544d2a542f7e2335'/>
<id>urn:sha1:2fef0a30ae6b2687dfb286cb544d2a542f7e2335</id>
<content type='text'>
I'm removing empty identifiers everywhere, because in practice they
always mean "no identifier" rather than "empty identifier". (An empty
identifier is impossible.) It's better to use `Option` to mean "no
identifier" because you then can't forget about the "no identifier"
possibility.

Some specifics:
- When testing an attribute for a single name, the commit uses the
  `has_name` method.
- When testing an attribute for multiple names, the commit uses the new
  `has_any_name` method.
- When using `match` on an attribute, the match arms now have `Some` on
  them.

In the tests, we now avoid printing empty identifiers by not printing
the identifier in the `error:` line at all, instead letting the carets
point out the problem.
</content>
</entry>
<entry>
<title>Improve `-Z crate-attr` diagnostics</title>
<updated>2025-04-13T20:46:02+00:00</updated>
<author>
<name>jyn</name>
<email>github@jyn.dev</email>
</author>
<published>2025-03-11T04:24:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d50a8d5fb3727277f82440524e20a67e29dead4c'/>
<id>urn:sha1:d50a8d5fb3727277f82440524e20a67e29dead4c</id>
<content type='text'>
- Show the `#![ ... ]` in the span (to make it clear that it should not
  be included in the CLI argument)
- Show more detailed errors when the crate has valid token trees but
  invalid syntax.
  Previously, `crate-attr=feature(foo),feature(bar)` would just say
  "invalid crate attribute" and point at the comma. Now, it explicitly
  says that the comma was unexpected, which is useful when using
  `--error-format=short`. It also fixes the column to show the correct
  span.
- Recover from parse errors. Previously we would abort immediately on
  syntax errors; now we go on to try and type-check the rest of the
  crate.

The new diagnostic code also happens to be slightly shorter.
</content>
</entry>
<entry>
<title>Allow boolean literals in `check-cfg`</title>
<updated>2025-04-03T09:54:23+00:00</updated>
<author>
<name>clubby789</name>
<email>jamie@hill-daniel.co.uk</email>
</author>
<published>2025-03-21T05:09:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3df2acd31ba14544ddb7fb1b0e73e6235824d4a3'/>
<id>urn:sha1:3df2acd31ba14544ddb7fb1b0e73e6235824d4a3</id>
<content type='text'>
</content>
</entry>
</feed>
