<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_middle/src/mir/mod.rs, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-10-02T06:55:50+00:00</updated>
<entry>
<title>mir-opt: Eliminate dead ref statements</title>
<updated>2025-10-02T06:55:50+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-06-08T07:30:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=571412f8190089c36758031fe09fc0ece59be6b7'/>
<id>urn:sha1:571412f8190089c36758031fe09fc0ece59be6b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add test.</title>
<updated>2025-09-16T22:50:32+00:00</updated>
<author>
<name>Camille Gillot</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2025-09-14T19:08:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=40d879a47f940a8a6219ded487ce1298ecafe271'/>
<id>urn:sha1:40d879a47f940a8a6219ded487ce1298ecafe271</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce `MirDumper` and `MirWriter`.</title>
<updated>2025-08-31T23:19:03+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-08-15T04:38:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5ce3797073ee5e6cc487b80effbc682533d9425c'/>
<id>urn:sha1:5ce3797073ee5e6cc487b80effbc682533d9425c</id>
<content type='text'>
MIR dumping is a mess. There are lots of functions and entry points,
e.g. `dump_mir`, `dump_mir_with_options`, `dump_polonius_mir`,
`dump_mir_to_writer`. Also, it's crucial that `create_dump_file` is
never called without `dump_enabled` first being checked, but there is no
mechanism for ensuring this and it's hard to tell if it is satisfied on
all paths. (`dump_enabled` is checked twice on some paths, however!)

This commit introduces `MirWriter`, which controls the MIR writing, and
encapsulates the `extra_data` closure and `options`. Two existing
functions are now methods of this type. It sets reasonable defaults,
allowing the removal of many `|_, _| Ok(())` closures.

The commit also introduces `MirDumper`, which is layered on top of
`MirWriter`, and which manages the creation of the dump files,
encapsulating pass names, disambiguators, etc. Four existing functions
are now methods of this type.
- `MirDumper::new` will only succeed if dumps are enabled, and will
  return `None` otherwise, which makes it impossible to dump when you
  shouldn't.
- It also sets reasonable defaults for various things like
  disambiguators, which means you no longer need to specify them in many
  cases. When they do need to be specified, it's now done via setter
  methods.
- It avoids some repetition. E.g. `dump_nll_mir` previously specifed the
  pass name `"nll"` four times and the disambiguator `&amp;0` three times;
  now it specifies them just once, to put them in the `MirDumper`.
- For Polonius, the `extra_data` closure can now be specified earlier,
  which avoids having to pass some arguments through some functions.
</content>
</entry>
<entry>
<title>Port `#[custom_mir(..)]` to the new attribute system</title>
<updated>2025-08-15T09:19:29+00:00</updated>
<author>
<name>Sasha Pourcelot</name>
<email>sasha.pourcelot@protonmail.com</email>
</author>
<published>2025-08-10T07:44:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=51bccdd1ab0802dd5a55bd06e956c8d547bdec2d'/>
<id>urn:sha1:51bccdd1ab0802dd5a55bd06e956c8d547bdec2d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve and regularize comment placement in doc code</title>
<updated>2025-07-26T05:02:09+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-07-26T00:35:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=715088094c2e2ef31158b4767ceacfba62c8e6ef'/>
<id>urn:sha1:715088094c2e2ef31158b4767ceacfba62c8e6ef</id>
<content type='text'>
Because doc code does not get automatically formatted, some doc code has
creative placements of comments that automatic formatting can't handle.
Reformat those comments to make the resulting code support standard Rust
formatting without breaking; this is generally an improvement to
readability as well.

Some comments are not indented to the prevailing indent, and are instead
aligned under some bit of code. Indent them to the prevailing indent,
and put spaces *inside* the comments to align them with code.

Some comments span several lines of code (which aren't the line the
comment is about) and expect alignment. Reformat them into one comment
not broken up by unrelated intervening code.

Some comments are placed on the same line as an opening brace, placing
them effectively inside the subsequent block, such that formatting would
typically format them like a line of that block. Move those comments to
attach them to what they apply to.

Some comments are placed on the same line as a one-line braced block,
effectively attaching them to the closing brace, even though they're
about the code inside the block. Reformat to make sure the comment will
stay on the same line as the code it's commenting.
</content>
</entry>
<entry>
<title>setup CI and tidy to use typos for spellchecking and fix few typos</title>
<updated>2025-07-03T07:51:06+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2024-12-07T10:51:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c76d032f0144b650a438ee1efba89c475e0b115b'/>
<id>urn:sha1:c76d032f0144b650a438ee1efba89c475e0b115b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mir: Mark `Statement` and `BasicBlockData` as `#[non_exhaustive]`</title>
<updated>2025-06-30T23:14:13+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-06-30T23:02:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90e0835004b2ec6dc596bbecf65eb49f49c01e7f'/>
<id>urn:sha1:90e0835004b2ec6dc596bbecf65eb49f49c01e7f</id>
<content type='text'>
Ensure they are always created using constructors.
</content>
</entry>
<entry>
<title>mir: Use the `new` method for `BasicBlockData`</title>
<updated>2025-06-29T12:39:13+00:00</updated>
<author>
<name>dianqk</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2025-06-16T14:31:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=24e553e6bcfa329b04b93c0978e00b492224a255'/>
<id>urn:sha1:24e553e6bcfa329b04b93c0978e00b492224a255</id>
<content type='text'>
</content>
</entry>
<entry>
<title>AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added.</title>
<updated>2025-04-28T09:23:13+00:00</updated>
<author>
<name>Andrew Zhogin</name>
<email>andrew.zhogin@gmail.com</email>
</author>
<published>2024-08-26T13:45:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c366756a8537ef998d32c1ef57098d5aae7ca92f'/>
<id>urn:sha1:c366756a8537ef998d32c1ef57098d5aae7ca92f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move `has_self` field to `hir::AssocKind::Fn`.</title>
<updated>2025-04-14T06:13:04+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-04-10T20:28:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce2aa97cd647bdfcb5859489d93526622bb388a0'/>
<id>urn:sha1:ce2aa97cd647bdfcb5859489d93526622bb388a0</id>
<content type='text'>
`hir::AssocItem` currently has a boolean `fn_has_self_parameter` field,
which is misplaced, because it's only relevant for associated fns, not
for associated consts or types. This commit moves it (and renames it) to
the `AssocKind::Fn` variant, where it belongs.

This requires introducing a new C-style enum, `AssocTag`, which is like
`AssocKind` but without the fields. This is because `AssocKind` values
are passed to various functions like `find_by_ident_and_kind` to
indicate what kind of associated item should be searched for, and having
to specify `has_self` isn't relevant there.

New methods:
- Predicates `AssocItem::is_fn` and `AssocItem::is_method`.
- `AssocItem::as_tag` which converts `AssocItem::kind` to `AssocTag`.

Removed `find_by_name_and_kinds`, which is unused.

`AssocItem::descr` can now distinguish between methods and associated
functions, which slightly improves some error messages.
</content>
</entry>
</feed>
