rust/src
bors 5b270e1198 Auto merge of #126813 - compiler-errors:SliceLike, r=lcnr
Add `SliceLike` to `rustc_type_ir`, use it in the generic solver code (+ some other changes)

First, we split out `TraitRef::new_from_args` which takes *just* `ty::GenericArgsRef` from `TraitRef::new` which takes `impl IntoIterator<Item: Into<GenericArg>>`. I will explain in a minute why.

Second, we introduce `SliceLike`, which allows us to be generic over `List<T>` and `[T]`. This trait has an `as_slice()` and `into_iter()` method, and some other convenience functions. However, importantly, since types like `I::GenericArgs` now implement `SliceLike` rather than `IntoIter<Item = I::GenericArg>`, we can't use `TraitRef::new` on this directly. That's where `new_from_args` comes in.

Finally, we adjust all the code to use these slice operators. Some things get simpler, some things get a bit more annoying since we need to use `as_slice()` in a few places. 🤷

r? lcnr
2024-06-25 00:33:49 +00:00
..
bootstrap Rollup merge of #126298 - heiher:loongarch64-musl-ci, r=Mark-Simulacrum 2024-06-24 06:27:13 +02:00
ci ci: Add support for dist-loongarch64-musl 2024-06-23 22:36:35 +08:00
doc Rollup merge of #124712 - Enselic:deprecate-inline-threshold, r=pnkfelix 2024-06-24 15:51:00 -04:00
etc Allow numbers in rustdoc tests commands 2024-06-24 11:10:18 +02:00
librustdoc Auto merge of #126761 - GuillaumeGomez:unsafe_extern_blocks, r=spastorino 2024-06-22 20:59:00 +00:00
llvm-project@5a5152f653 Update to LLVM 18.1.7 2024-06-06 08:37:27 +02:00
rustdoc-json-types Remove Type from rustdoc Const 2024-06-05 22:25:42 +01:00
tools Auto merge of #126813 - compiler-errors:SliceLike, r=lcnr 2024-06-25 00:33:49 +00:00
README.md
stage0 bump stage0 compiler 2024-06-11 15:10:03 +02:00
version set version number to 1.81.0 2024-06-07 10:37:34 +02: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.