rust/src
bors 42b384ec0d Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr
Turn ProjectionElem::Subtype into CastKind::Subtype

I noticed that drop elaboration can't, in general, handle `ProjectionElem::SubType`. It creates a disjoint move path that overlaps with other move paths. (`Subslice` does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent then `MovePath.place` has multiple possible projections. (It would probably make sense to remove all `Subtype` projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.)

The only reason this doesn't break is that `Subtype` is always the sole projection of the local its applied to. For the same reason, it works fine as a `CastKind` so I figured that makes more sense than documenting and validating this hidden invariant.

cc rust-lang/rust#112651, rust-lang/rust#133258

r? Icnr (bc you've been the main person dealing with `Subtype` it looks like)
2025-10-02 01:54:48 +00:00
..
bootstrap Rollup merge of #147189 - yotamofek:pr/rustdoc/highlight-optimizations-2, r=GuillaumeGomez 2025-10-01 22:15:00 +10:00
build_helper Include additional hashes in src/stage0 2025-09-27 08:43:22 -04:00
ci Remove usage of compiletest-use-stage0-libtest from CI 2025-09-30 16:08:48 +02:00
doc Fix typo in 'unfulfilled_lint_expectation' to plural 2025-10-01 11:07:42 -04:00
etc fix tuple child creation 2025-09-30 03:04:23 -05:00
gcc@4e995bd73c Update GCC submodule 2025-08-26 18:09:42 +02:00
librustdoc Replace rustc_span::Span with a stripped down version for librustdoc's highlighter 2025-09-30 22:01:30 +03:00
llvm-project@8c30b9c509 Update LLVM to 21.1.2 2025-09-24 07:34:22 +08:00
rustc-std-workspace
rustdoc-json-types Add new doc(attribute = "...") attribute 2025-08-28 15:56:29 +02:00
tools Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr 2025-10-02 01:54:48 +00:00
README.md
stage0 Update stage0 per previous commmit 2025-09-27 08:45:40 -04:00
version Bump version to 1.92.0 2025-09-13 10:09:15 -04:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.