<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_passes/src/input_stats.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-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>Retire hir::*ItemRef.</title>
<updated>2025-07-13T13:50:01+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2025-07-02T20:15:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=21fd82adbcaf322973ca6edb28a801be755a2225'/>
<id>urn:sha1:21fd82adbcaf322973ca6edb28a801be755a2225</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Retire hir::ForeignItemRef.</title>
<updated>2025-07-13T13:50:00+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2025-07-03T09:32:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5bd3841668f43626b89c9295de960cc7e2a3c2aa'/>
<id>urn:sha1:5bd3841668f43626b89c9295de960cc7e2a3c2aa</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>Tweak `-Zinput-stats` and `-Zmeta-stats` output.</title>
<updated>2025-06-24T03:07:14+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-24T02:45:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b2a57e6b428689d8b6a9881f8ccdfd30d76767bc'/>
<id>urn:sha1:b2a57e6b428689d8b6a9881f8ccdfd30d76767bc</id>
<content type='text'>
To make it match `-Zmacro-stats`, and work better if you have enabled it
for multiple crates.
- Print each crate's name.
- Print a `===` banner at the start and end for separation.
</content>
</entry>
<entry>
<title>Reverse order of `-Zinput-stats` and `-Zmeta-stats` output.</title>
<updated>2025-06-24T03:05:53+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-24T00:42:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e7e1732caa369221913e3d50af19324e0afa869'/>
<id>urn:sha1:1e7e1732caa369221913e3d50af19324e0afa869</id>
<content type='text'>
Currently they have the largest items at the end. I believe the
rationale is that it saves you scrolling up through terminal output
because the important stuff is at the bottom. But it's also surprising
and a bit confusing, and I think the obvious order (big things at the
top) is better.
</content>
</entry>
<entry>
<title>Make stats code nicer.</title>
<updated>2025-06-24T03:05:51+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-24T00:11:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8b1abd6578dea3e7632014b38dbc0acadb5f0861'/>
<id>urn:sha1:8b1abd6578dea3e7632014b38dbc0acadb5f0861</id>
<content type='text'>
Taking inspiration from `-Zmacro-stats`:
- Use "{prefix}" consistently.
- Use names for column widths.
- Write output in a single `eprint!` call, in an attempt to minimize
  interleaving of output from different rustc processes.
- Use `repeat` for the long `---` banners.
</content>
</entry>
<entry>
<title>Overhaul the `thousands` module.</title>
<updated>2025-06-12T05:26:06+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-05T05:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bdfe1b9fb0c3f98df2a99ab96c6190542c234060'/>
<id>urn:sha1:bdfe1b9fb0c3f98df2a99ab96c6190542c234060</id>
<content type='text'>
It currently only inserts separators into `usize`s, because that's all
that has been needed so far. `-Zmacro-stats` will need `isize` and `f64`
handling, so this commit adds that.
</content>
</entry>
<entry>
<title>Avoid over-counting of `UsePath` in the HIR stats.</title>
<updated>2025-05-28T07:02:39+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-05-28T06:25:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ac33068f9fdc9d70500325d0f9b4308274fa88a9'/>
<id>urn:sha1:ac33068f9fdc9d70500325d0f9b4308274fa88a9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add `{ast,hir,thir}::PatKind::Missing` variants.</title>
<updated>2025-03-27T22:18:57+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-03-26T22:33:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9f089e080c47bc282aa98f1e8c72ff44076afbb9'/>
<id>urn:sha1:9f089e080c47bc282aa98f1e8c72ff44076afbb9</id>
<content type='text'>
"Missing" patterns are possible in bare fn types (`fn f(u32)`) and
similar places. Currently these are represented in the AST with
`ast::PatKind::Ident` with no `by_ref`, no `mut`, an empty ident, and no
sub-pattern. This flows through to `{hir,thir}::PatKind::Binding` for
HIR and THIR.

This is a bit nasty. It's very non-obvious, and easy to forget to check
for the exceptional empty identifier case.

This commit adds a new variant, `PatKind::Missing`, to do it properly.

The process I followed:
- Add a `Missing` variant to `{ast,hir,thir}::PatKind`.
- Chang `parse_param_general` to produce `ast::PatKind::Missing`
  instead of `ast::PatKind::Missing`.
- Look through `kw::Empty` occurrences to find functions where an
  existing empty ident check needs replacing with a `PatKind::Missing`
  check: `print_param`, `check_trait_item`, `is_named_param`.
- Add a `PatKind::Missing =&gt; unreachable!(),` arm to every exhaustive
  match identified by the compiler.
- Find which arms are actually reachable by running the test suite,
  changing them to something appropriate, usually by looking at what
  would happen to a `PatKind::Ident`/`PatKind::Binding` with no ref, no
  `mut`, an empty ident, and no subpattern.

Quite a few of the `unreachable!()` arms were never reached. This makes
sense because `PatKind::Missing` can't happen in every pattern, only
in places like bare fn tys and trait fn decls.

I also tried an alternative approach: modifying `ast::Param::pat` to
hold an `Option&lt;P&lt;Pat&gt;&gt;` instead of a `P&lt;Pat&gt;`, but that quickly turned
into a very large and painful change. Adding `PatKind::Missing` is much
easier.
</content>
</entry>
</feed>
