Go to file
bors a5efa01895 Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu
Rescope temp lifetime in if-let into IfElse with migration lint

Tracking issue #124085

This PR shortens the temporary lifetime to cover only the pattern matching and consequent branch of a `if let`.

At the expression location, means that the lifetime is shortened from previously the deepest enclosing block or statement in Edition 2021. This warrants an Edition change.

Coming with the Edition change, this patch also implements an edition lint to warn about the change and a safe rewrite suggestion to preserve the 2021 semantics in most cases.

Related to #103108.
Related crater runs: https://github.com/rust-lang/rust/pull/129466.
2024-09-13 03:47:30 +00:00
.github
LICENSES
compiler Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu 2024-09-13 03:47:30 +00:00
library Auto merge of #130281 - matthiaskrgr:rollup-1b2ibs8, r=matthiaskrgr 2024-09-12 18:27:55 +00:00
src Auto merge of #130040 - onur-ozkan:llvm-tools-with-ci-rustc, r=Kobzol 2024-09-12 20:51:46 +00:00
tests Auto merge of #107251 - dingxiangfei2009:let-chain-rescope, r=jieyouxu 2024-09-13 03:47:30 +00:00
.clang-format
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules Enzyme backend 2024-09-05 22:47:23 -04:00
.ignore
.mailmap Rollup merge of #129906 - BoxyUwU:boxy_mailmap, r=lqd 2024-09-02 22:35:23 +02:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYRIGHT
Cargo.lock Auto merge of #129346 - nnethercote:fix-double-handling-in-collect_tokens, r=petrochenkov 2024-09-08 05:35:23 +00:00
Cargo.toml
INSTALL.md
LICENSE-APACHE
LICENSE-MIT
README.md
RELEASES.md Rollup merge of #129995 - alexcrichton:remove-wasm32-wasip2-release-notes, r=pietroalbini 2024-09-06 07:33:58 +02:00
REUSE.toml
config.example.toml Rollup merge of #129473 - Urgau:fix-llvm-if-unchanged, r=onur-ozkan 2024-09-09 19:20:35 -07:00
configure
rust-bors.toml
rustfmt.toml
triagebot.toml notify Miri when intrinsics are changed 2024-09-11 16:31:05 +02:00
x
x.ps1
x.py

README.md

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

Why Rust?

  • Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrate with other languages.

  • Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.

  • Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).

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.