<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_mir_dataflow, branch 1.84.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.84.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.84.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-11-20T12:53:11+00:00</updated>
<entry>
<title>reduce false positives of tail-expr-drop-order from consumed values</title>
<updated>2024-11-20T12:53:11+00:00</updated>
<author>
<name>Ding Xiang Fei</name>
<email>dingxiangfei2009@protonmail.ch</email>
</author>
<published>2024-09-01T17:13:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=297b618944d4619a1990b1992d9142c6cf893dc6'/>
<id>urn:sha1:297b618944d4619a1990b1992d9142c6cf893dc6</id>
<content type='text'>
take 2

open up coroutines

tweak the wordings

the lint works up until 2021

We were missing one case, for ADTs, which was
causing `Result` to yield incorrect results.

only include field spans with significant types

deduplicate and eliminate field spans

switch to emit spans to impl Drops

Co-authored-by: Niko Matsakis &lt;nikomat@amazon.com&gt;

collect drops instead of taking liveness diff

apply some suggestions and add explantory notes

small fix on the cache

let the query recurse through coroutine

new suggestion format with extracted variable name

fine-tune the drop span and messages

bugfix on runtime borrows

tweak message wording

filter out ecosystem types earlier

apply suggestions

clippy

check lint level at session level

further restrict applicability of the lint

translate bid into nop for stable mir

detect cycle in type structure
</content>
</entry>
<entry>
<title>use `TypingEnv` when no `infcx` is available</title>
<updated>2024-11-18T09:38:56+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2024-11-15T12:53:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9cba14b95bb07a5b31ed1aac2bf4eadd248232da'/>
<id>urn:sha1:9cba14b95bb07a5b31ed1aac2bf4eadd248232da</id>
<content type='text'>
the behavior of the type system not only depends on the current
assumptions, but also the currentnphase of the compiler. This is
mostly necessary as we need to decide whether and how to reveal
opaque types. We track this via the `TypingMode`.
</content>
</entry>
<entry>
<title>Remove `ResultsVisitable`.</title>
<updated>2024-11-04T23:18:03+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-10-31T01:33:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c904c6aaffa10f92e8f203f69bd8b87b0b0f4353'/>
<id>urn:sha1:c904c6aaffa10f92e8f203f69bd8b87b0b0f4353</id>
<content type='text'>
Now that `Results` is the only impl of `ResultsVisitable`, the trait can
be removed. This simplifies things by removining unnecessary layers of
indirection and abstraction.

- `ResultsVisitor` is simpler.
  - Its type parameter changes from `R` (an analysis result) to the
    simpler `A` (an analysis).
  - It no longer needs the `Domain` associated type, because it can use
    `A::Domain`.
  - Occurrences of `R` become `Results&lt;'tcx, A&gt;`, because there is now
    only one kind of analysis results.

- `save_as_intervals` also changes type parameter from `R` to `A`.

- The `results.reconstruct_*` method calls are replaced with
  `results.analysis.apply_*` method calls, which are equivalent.

- `Direction::visit_results_in_block` is simpler, with a single generic
  param (`A`) instead of two (`D` and `R`/`F`, with a bound connecting
  them). Likewise for `visit_results`.

- The `ResultsVisitor` impls for `MirBorrowCtxt` and
  `StorageConflictVisitor` are now specific about the type of the
  analysis results they work with. They both used to have a type param
  `R` but they weren't genuinely generic. In both cases there was only a
  single results type that made sense to instantiate them with.
</content>
</entry>
<entry>
<title>Replace `BorrowckResults` with `Borrowck`.</title>
<updated>2024-11-04T23:18:01+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-10-31T00:02:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3350edf8fdcab10b60bf8173bd3b1551f567cd44'/>
<id>urn:sha1:3350edf8fdcab10b60bf8173bd3b1551f567cd44</id>
<content type='text'>
The results of most analyses end up in a `Results&lt;'tcx, A&gt;`, where `A`
is the analysis. It's then possible to traverse the results via a
`ResultsVisitor`, which relies on the `ResultsVisitable` trait. (That
trait ends up using the same `apply_*` methods that were used when
computing the analysis, albeit indirectly.)

This pattern of "compute analysis results, then visit them" is common.
But there is one exception. For borrow checking we compute three
separate analyses (`Borrows`, `MaybeUninitializedPlaces`, and
`EverInitializedPlaces`), combine them into a single `BorrowckResults`,
and then do a single visit of that `BorrowckResults` with
`MirBorrowckResults`. `BorrowckResults` is just different enough from
`Results` that it requires the existence of `ResultsVisitable`, which
abstracts over the traversal differences between `Results` and
`BorrowckResults`.

This commit changes things by introducing `Borrowck` and bundling the
three borrowck analysis results into a standard `Results&lt;Borrowck&gt;`
instead of the exceptional `BorrowckResults`. Once that's done, the
results can be visited like any other analysis results.
`BorrowckResults` is removed, as is `impl ResultsVisitable for
BorrowckResults`. (It's instructive to see how similar the added `impl
Analysis for Borrowck` is to the removed `impl ResultsVisitable for
BorrowckResults`. They're both doing exactly the same things.)

Overall this increases the number of lines of code and might not seem
like a win. But it enables the removal of `ResultsVisitable` in the next
commit, which results in many simplifications.
</content>
</entry>
<entry>
<title>compiler: Remove unused rustc_target from Cargo.tomls</title>
<updated>2024-11-03T21:38:47+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2024-11-03T19:30:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fa2047370b4ed15d7ab3cbb54ad1c16f595322df'/>
<id>urn:sha1:fa2047370b4ed15d7ab3cbb54ad1c16f595322df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `ValueAnalysis` and `ValueAnalysisWrapper`.</title>
<updated>2024-10-31T01:46:26+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-10-30T03:47:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=911edbfe42c557774488d46fbb0440994d555084'/>
<id>urn:sha1:911edbfe42c557774488d46fbb0440994d555084</id>
<content type='text'>
They represent a lot of abstraction and indirection, but they're only
used for `ConstAnalysis`, and apparently won't be used for any other
analyses in the future. This commit inlines and removes them, which
makes `ConstAnalysis` easier to read and understand.
</content>
</entry>
<entry>
<title>Rollup merge of #132246 - workingjubilee:campaign-on-irform, r=compiler-errors</title>
<updated>2024-10-30T21:01:37+00:00</updated>
<author>
<name>Jubilee</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2024-10-30T21:01:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=847b6fe6b0c18c282fd13406ab48f58a5b4b2149'/>
<id>urn:sha1:847b6fe6b0c18c282fd13406ab48f58a5b4b2149</id>
<content type='text'>
Rename `rustc_abi::Abi` to `BackendRepr`

Remove the confabulation of `rustc_abi::Abi` with what "ABI" actually means by renaming it to `BackendRepr`, and rename `Abi::Aggregate` to `BackendRepr::Memory`. The type never actually represented how things are passed, as that has to have `PassMode` considered, at minimum, but rather it just is how we represented some things to the backend. This conflation arose because LLVM, the primary backend at the time, would lower certain IR forms using certain ABIs. Even that only somewhat was true, as it broke down when one ventured significantly afield of what is described by the System V AMD64 ABI either by using different architectures, ABI-modifying IR annotations, the same architecture **with different ISA extensions enabled**, or other... unexpected delights.

Unfortunately both names are still somewhat of a misnomer right now, as people have written code for years based on this misunderstanding. Still, their original names are even moreso, and for better or worse, this backend code hasn't received as much maintenance as the rest of the compiler, lately. Actually arriving at a correct end-state will simply require us to disentangle a lot of code in order to fix, much of it pointlessly repeated in several places. Thus this is not an "actual fix", just a way to deflect further misunderstandings.
</content>
</entry>
<entry>
<title>Rollup merge of #132346 - nnethercote:some-graphviz-tweaks, r=cjgillot</title>
<updated>2024-10-30T14:22:05+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>39484203+jieyouxu@users.noreply.github.com</email>
</author>
<published>2024-10-30T14:22:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=18e44f89bf97dfd5e7bf42bb3c6965650b565c16'/>
<id>urn:sha1:18e44f89bf97dfd5e7bf42bb3c6965650b565c16</id>
<content type='text'>
Some graphviz tweaks

r? `@cjgillot`
</content>
</entry>
<entry>
<title>Rollup merge of #132338 - nnethercote:rm-Engine, r=nnethercote</title>
<updated>2024-10-30T05:40:37+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-10-30T05:40:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2055237e8f7087db9a7ca4c0b9921cbc858f345a'/>
<id>urn:sha1:2055237e8f7087db9a7ca4c0b9921cbc858f345a</id>
<content type='text'>
Remove `Engine`

It's just unnecessary plumbing. Removing it results in less code, and simpler code.

r? ``@cjgillot``
</content>
</entry>
<entry>
<title>Return label from `write_node_label`.</title>
<updated>2024-10-30T02:21:32+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-10-30T02:21:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d921be92a459b41f0ba2d5b97e32397902f37294'/>
<id>urn:sha1:d921be92a459b41f0ba2d5b97e32397902f37294</id>
<content type='text'>
Instead of appending an empty label. Because it's conceptually simpler.
</content>
</entry>
</feed>
