Go to file
Matthias Krüger e6ba504029
Rollup merge of #121908 - Nadrieril:dynamic-variant-collection, r=matthewjasper
match lowering: don't collect test alternatives ahead of time

I'm very happy with this one. Before this, when sorting candidates into the possible test branches, we manually computed `usize` indices to determine in which branch each candidate goes. To make this work we had a first pass that collected the possible alternatives we'd have to deal with, and a second pass that actually sorts the candidates.

In this PR, I replace `usize` indices with a dedicated enum. This makes `sort_candidates` easier to follow, and we don't need the first pass anymore.

r? ``@matthewjasper``
2024-03-13 06:41:21 +01:00
.github
.reuse
LICENSES
compiler Rollup merge of #121908 - Nadrieril:dynamic-variant-collection, r=matthewjasper 2024-03-13 06:41:21 +01:00
library Fix typo in lib.rs of proc_macro 2024-03-12 13:35:14 +01:00
src Auto merge of #122394 - weihanglo:update-cargo, r=weihanglo 2024-03-12 19:01:58 +00:00
tests Rollup merge of #121908 - Nadrieril:dynamic-variant-collection, r=matthewjasper 2024-03-13 06:41:21 +01:00
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
.mailmap
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYRIGHT
Cargo.lock
Cargo.toml
INSTALL.md
LICENSE-APACHE
LICENSE-MIT
README.md
RELEASES.md
config.example.toml
configure
rust-bors.toml
rustfmt.toml
triagebot.toml
x
x.ps1
x.py

README.md

The Rust Programming Language

Rust Community

This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.

Note: this README is for users rather than contributors. If you wish to contribute to the compiler, you should read CONTRIBUTING.md instead.

Table of Contents

Quick Start

Read "Installation" from The Book.

Installing from Source

If you really want to install from source (though this is not recommended), see INSTALL.md.

Getting Help

See https://www.rust-lang.org/community for a list of chat platforms and forums.

Contributing

See CONTRIBUTING.md.

License

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.

Trademark

The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the "Rust Trademarks").

If you want to use these names or brands, please read the media guide.

Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.