<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_pattern_analysis/src, branch 1.89.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.89.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.89.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-05-28T10:03:01+00:00</updated>
<entry>
<title>Use `builin_index` instead of hand-rolling it</title>
<updated>2025-05-28T10:03:01+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-05-26T10:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=550aed825b3a630b5b2bd235e193bfce065268c2'/>
<id>urn:sha1:550aed825b3a630b5b2bd235e193bfce065268c2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert "Fix stack overflow in exhaustiveness due to recursive HIR opaque type values"</title>
<updated>2025-05-20T10:09:01+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2025-04-28T19:41:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=47b9e373cba69d66da9f91345219ff4f07eba84a'/>
<id>urn:sha1:47b9e373cba69d66da9f91345219ff4f07eba84a</id>
<content type='text'>
This reverts commit b08e9c2a60f4dbab4bdaa733727947b3395de329.
</content>
</entry>
<entry>
<title>Remove #![feature(let_chains)] from library and src/librustdoc</title>
<updated>2025-05-16T14:14:24+00:00</updated>
<author>
<name>est31</name>
<email>MTest31@outlook.com</email>
</author>
<published>2025-05-13T13:10:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=258e8808616e4cb5c65d2692c66a6c61e17cc09f'/>
<id>urn:sha1:258e8808616e4cb5c65d2692c66a6c61e17cc09f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>error early when mixing deref patterns with normal constructors</title>
<updated>2025-05-07T01:53:55+00:00</updated>
<author>
<name>dianne</name>
<email>diannes.gm@gmail.com</email>
</author>
<published>2025-04-21T06:57:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fb261a179d2c210785b6e9005201e262dac801b5'/>
<id>urn:sha1:fb261a179d2c210785b6e9005201e262dac801b5</id>
<content type='text'>
Without adding proper support for mixed exhaustiveness, mixing deref
patterns with normal constructors would either violate
`ConstructorSet::split`'s invariant 4 or 7. We'd either be ignoring rows
with normal constructors or we'd have problems in unspecialization from
non-disjoint constructors. Checking mixed exhaustivenss similarly to how
unions are currently checked should work, but the diagnostics for unions
are confusing. Since mixing deref patterns with normal constructors is
pretty niche (currently it only makes sense for `Cow`), emitting an
error lets us avoid committing to supporting mixed exhaustiveness
without a good answer for the diagnostics.
</content>
</entry>
<entry>
<title>let deref patterns participate in usefulness/exhaustiveness</title>
<updated>2025-05-07T01:53:55+00:00</updated>
<author>
<name>dianne</name>
<email>diannes.gm@gmail.com</email>
</author>
<published>2025-04-17T09:33:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b41d8bde00930d80f07b7aa90cc0a8e6bd423413'/>
<id>urn:sha1:b41d8bde00930d80f07b7aa90cc0a8e6bd423413</id>
<content type='text'>
This does not yet handle the case of mixed deref patterns with normal
constructors; it'll ICE in `Constructor::is_covered_by`. That'll be
fixed in a later commit.
</content>
</entry>
<entry>
<title>Make #![feature(let_chains)] bootstrap conditional in compiler/</title>
<updated>2025-04-23T14:40:30+00:00</updated>
<author>
<name>est31</name>
<email>MTest31@outlook.com</email>
</author>
<published>2025-04-23T13:51:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7493e1cdf64b381f7eb910da982fcbbad7d64769'/>
<id>urn:sha1:7493e1cdf64b381f7eb910da982fcbbad7d64769</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move eager translation to a method on `Diag`</title>
<updated>2025-04-17T01:38:59+00:00</updated>
<author>
<name>Jake Goulding</name>
<email>jake.goulding@gmail.com</email>
</author>
<published>2025-03-21T14:09:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=01178849174bdff3e3e951827d9ea4884c23b758'/>
<id>urn:sha1:01178849174bdff3e3e951827d9ea4884c23b758</id>
<content type='text'>
This will allow us to eagerly translate messages on a top-level
diagnostic, such as a `LintDiagnostic`. As a bonus, we can remove the
awkward closure passed into Subdiagnostic and make better use of
`Into`.
</content>
</entry>
<entry>
<title>Fix stack overflow in exhaustiveness due to recursive HIR opaque type values</title>
<updated>2025-04-07T22:41:48+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2025-04-07T22:32:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b08e9c2a60f4dbab4bdaa733727947b3395de329'/>
<id>urn:sha1:b08e9c2a60f4dbab4bdaa733727947b3395de329</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #139035 - nnethercote:PatKind-Missing, r=oli-obk</title>
<updated>2025-04-07T12:29:17+00:00</updated>
<author>
<name>Stuart Cook</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2025-04-07T12:29:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=82df6229b6383ba1395eb0599309b30e257c3c3b'/>
<id>urn:sha1:82df6229b6383ba1395eb0599309b30e257c3c3b</id>
<content type='text'>
Add new `PatKind::Missing` variants

To avoid some ugly uses of `kw::Empty` when handling "missing" patterns, e.g. in bare fn tys. Helps with #137978. Details in the individual commits.

r? ``@oli-obk``
</content>
</entry>
<entry>
<title>Auto merge of #138785 - lcnr:typing-mode-borrowck, r=compiler-errors,oli-obk</title>
<updated>2025-04-04T19:54:42+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2025-04-04T19:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=17ffbc81a30c094193836a5d7f90dff273b5df93'/>
<id>urn:sha1:17ffbc81a30c094193836a5d7f90dff273b5df93</id>
<content type='text'>
add `TypingMode::Borrowck`

Shares the first commit with #138499, doesn't really matter which PR to land first :blush: :grin:

Introduces `TypingMode::Borrowck` which unlike `TypingMode::Analysis`, uses the hidden type computed by HIR typeck as the initial value of opaques instead of an unconstrained infer var. This is a part of https://github.com/rust-lang/types-team/issues/129.

Using this new `TypingMode` is unfortunately a breaking change for now, see tests/ui/impl-trait/non-defining-uses/as-projection-term.rs. Using an inference variable as the initial value results in non-defining uses in the defining scope. We therefore only enable it if with `-Znext-solver=globally` or `-Ztyping-mode-borrowck`

To do that the PR contains the following changes:
- `TypeckResults::concrete_opaque_type` are already mapped to the definition of the opaque type
  - writeback now checks that the non-lifetime parameters of the opaque are universal
  - for this, `fn check_opaque_type_parameter_valid` is moved from `rustc_borrowck` to `rustc_trait_selection`
- we add a new `query type_of_opaque_hir_typeck` which, using the same visitors as MIR typeck, attempts to merge the hidden types from HIR typeck from all defining scopes
  - done by adding a `DefiningScopeKind` flag to toggle between using borrowck and HIR typeck
  - the visitors stop checking that the MIR type matches the HIR type. This is trivial as the HIR type are now used as the initial hidden types of the opaque. This check is useful as a safeguard when not using `TypingMode::Borrowck`, but adding it to the new structure is annoying and it's not soundness critical, so I intend to not add it back.
- add a `TypingMode::Borrowck`  which behaves just like `TypingMode::Analysis` except when normalizing opaque types
   - it uses `type_of_opaque_hir_typeck(opaque)` as the initial value after replacing its regions with new inference vars
   - it uses structural lookup in the new solver

fixes #112201, fixes #132335, fixes #137751

r? `@compiler-errors` `@oli-obk`
</content>
</entry>
</feed>
