<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_ast/src/util, 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-07-31T09:56:11+00:00</updated>
<entry>
<title>Deduplicate `IntTy`/`UintTy`/`FloatTy`.</title>
<updated>2025-07-31T09:56:11+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-07-31T01:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1901dde97bdff7b6b308c41d751e826df4eb2016'/>
<id>urn:sha1:1901dde97bdff7b6b308c41d751e826df4eb2016</id>
<content type='text'>
There are identical definitions in `rustc_type_ir` and `rustc_ast`. This
commit removes them and places a single definition in `rustc_ast_ir`.
This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but
means a bunch of silly conversion functions can be removed.

The one annoying wrinkle is that the old version had differences in
their `Debug` impls, e.g. one printed `u32` while the other printed
`U32`. Some compiler error messages rely on the former (yuk), and some
clippy output depends on the latter. So the commit also changes clippy
to not rely on `Debug` and just implement what it needs itself.
</content>
</entry>
<entry>
<title>update to literal-escaper-0.0.5</title>
<updated>2025-07-08T10:16:44+00:00</updated>
<author>
<name>Marijn Schouten</name>
<email>mhkbst@gmail.com</email>
</author>
<published>2025-07-08T10:16:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d44dcd451326d32516c22ee5f998304afaf19c4d'/>
<id>urn:sha1:d44dcd451326d32516c22ee5f998304afaf19c4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>compiler: rename {ast,hir}::BareFn* to FnPtr*</title>
<updated>2025-07-06T22:03:08+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2025-07-06T19:59:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0a4f87a144616f35da510b82acc288aceebd5b9b'/>
<id>urn:sha1:0a4f87a144616f35da510b82acc288aceebd5b9b</id>
<content type='text'>
Fix some comments and related types and locals where it is obvious, e.g.
- bare_fn -&gt; fn_ptr
- LifetimeBinderKind::BareFnType -&gt; LifetimeBinderKind::FnPtrType

Co-authored-by: León Orell Valerian Liehr &lt;me@fmease.dev&gt;
</content>
</entry>
<entry>
<title>Introduce `ByteSymbol`.</title>
<updated>2025-06-30T10:42:27+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-01T22:59:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=478f8287c0e2c35cda511fd3ac01b7ac78ee7cfe'/>
<id>urn:sha1:478f8287c0e2c35cda511fd3ac01b7ac78ee7cfe</id>
<content type='text'>
It's like `Symbol` but for byte strings. The interner is now used for
both `Symbol` and `ByteSymbol`. E.g. if you intern `"dog"` and `b"dog"`
you'll get a `Symbol` and a `ByteSymbol` with the same index and the
characters will only be stored once.

The motivation for this is to eliminate the `Arc`s in `ast::LitKind`, to
make `ast::LitKind` impl `Copy`, and to avoid the need to arena-allocate
`ast::LitKind` in HIR. The latter change reduces peak memory by a
non-trivial amount on literal-heavy benchmarks such as `deep-vector` and
`tuple-stress`.

`Encoder`, `Decoder`, `SpanEncoder`, and `SpanDecoder` all get some
changes so that they can handle normal strings and byte strings.

This change does slow down compilation of programs that use
`include_bytes!` on large files, because the contents of those files are
now interned (hashed). This makes `include_bytes!` more similar to
`include_str!`, though `include_bytes!` contents still aren't escaped,
and hashing is still much cheaper than escaping.
</content>
</entry>
<entry>
<title>update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing</title>
<updated>2025-06-23T06:36:22+00:00</updated>
<author>
<name>Marijn Schouten</name>
<email>mhkbst@gmail.com</email>
</author>
<published>2025-03-07T11:17:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=707a6f54631c322e8c8ccff363fe024d67d93aa2'/>
<id>urn:sha1:707a6f54631c322e8c8ccff363fe024d67d93aa2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace `rustc_lexer/unescape` with `rustc-literal-escaper` crate</title>
<updated>2025-04-04T12:44:45+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2025-04-04T12:44:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aff2bc7a8815b89dd8dccf2564f5178118c1a3ec'/>
<id>urn:sha1:aff2bc7a8815b89dd8dccf2564f5178118c1a3ec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Tighten up assignment operator representations.</title>
<updated>2025-04-02T23:23:03+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-12-19T23:15:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ddcb370bc6c2de76c2a2f8b6cfb46a7b6ec553e6'/>
<id>urn:sha1:ddcb370bc6c2de76c2a2f8b6cfb46a7b6ec553e6</id>
<content type='text'>
In the AST, currently we use `BinOpKind` within `ExprKind::AssignOp` and
`AssocOp::AssignOp`, even though this allows some nonsensical
combinations. E.g. there is no `&amp;&amp;=` operator. Likewise for HIR and
THIR.

This commit introduces `AssignOpKind` which only includes the ten
assignable operators, and uses it in `ExprKind::AssignOp` and
`AssocOp::AssignOp`. (And does similar things for `hir::ExprKind` and
`thir::ExprKind`.) This avoids the possibility of nonsensical
combinations, as seen by the removal of the `bug!` case in
`lang_item_for_binop`.

The commit is mostly plumbing, including:
- Adds an `impl From&lt;AssignOpKind&gt; for BinOpKind` (AST) and `impl
  From&lt;AssignOp&gt; for BinOp` (MIR/THIR).
- `BinOpCategory` can now be created from both `BinOpKind` and
  `AssignOpKind`.
- Replaces the `IsAssign` type with `Op`, which has more information and
  a few methods.
- `suggest_swapping_lhs_and_rhs`: moves the condition to the call site,
  it's easier that way.
- `check_expr_inner`: had to factor out some code into a separate
  method.

I'm on the fence about whether avoiding the nonsensical combinations is
worth the extra code.
</content>
</entry>
<entry>
<title>Refactor YieldKind so postfix yield must have an expression</title>
<updated>2025-03-18T19:19:43+00:00</updated>
<author>
<name>Eric Holk</name>
<email>ericholk@microsoft.com</email>
</author>
<published>2025-03-18T19:19:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2bd7f73c2175c1f0ad56a0be4b5c39e2fc5ab97b'/>
<id>urn:sha1:2bd7f73c2175c1f0ad56a0be4b5c39e2fc5ab97b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Preserve yield position during pretty printing</title>
<updated>2025-03-14T19:21:59+00:00</updated>
<author>
<name>Eric Holk</name>
<email>ericholk@microsoft.com</email>
</author>
<published>2025-03-12T23:27:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1c0916a2b3cd6c595e1c7b69a31d507f7619bb67'/>
<id>urn:sha1:1c0916a2b3cd6c595e1c7b69a31d507f7619bb67</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement .use keyword as an alias of clone</title>
<updated>2025-03-06T20:58:32+00:00</updated>
<author>
<name>Santiago Pastorino</name>
<email>spastorino@gmail.com</email>
</author>
<published>2024-10-02T19:35:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=05c516446a0f6105ce695da00d5cf5a0eb54e808'/>
<id>urn:sha1:05c516446a0f6105ce695da00d5cf5a0eb54e808</id>
<content type='text'>
</content>
</entry>
</feed>
