Find a file
bors 5a6c1aa2bc Auto merge of #121421 - saethlin:smarter-mono, r=oli-obk
Avoid lowering code under dead SwitchInt targets

The objective of this PR is to detect and eliminate code which is guarded by an `if false`, even if that `false` is a constant which is not known until monomorphization, or is `intrinsics::debug_assertions()`.

The effect of this is that we generate no LLVM IR the standard library's unsafe preconditions, when they are compiled in a build where they should be immediately optimized out. This mono-time optimization ensures that builds which disable debug assertions do not grow a linkage requirement against `core`, which compiler-builtins currently needs: https://github.com/rust-lang/rust/issues/121552

This revives the codegen side of https://github.com/rust-lang/rust/pull/91222 as planned in https://github.com/rust-lang/rust/issues/120848.
2024-03-13 05:07:26 +00:00
.github Auto merge of #112268 - lqd:osx-1cgu, r=Kobzol 2024-03-12 02:02:32 +00:00
.reuse
compiler Auto merge of #121421 - saethlin:smarter-mono, r=oli-obk 2024-03-13 05:07:26 +00:00
library Fix typo in lib.rs of proc_macro 2024-03-12 13:35:14 +01:00
LICENSES
src Auto merge of #122394 - weihanglo:update-cargo, r=weihanglo 2024-03-12 19:01:58 +00:00
tests Avoid lowering code under dead SwitchInt targets 2024-03-12 19:01:04 -04:00
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
.mailmap
Cargo.lock Auto merge of #122036 - alexcrichton:test-wasm-with-wasi, r=oli-obk 2024-03-12 00:03:54 +00:00
Cargo.toml LLVM Bitcode Linker: Added crate 2024-03-11 13:35:35 +01:00
CODE_OF_CONDUCT.md
config.example.toml [bootstrap] Move the split-debuginfo setting to the per-target section 2024-03-11 20:17:00 +01:00
configure
CONTRIBUTING.md
COPYRIGHT
INSTALL.md
LICENSE-APACHE
LICENSE-MIT
README.md
RELEASES.md
rust-bors.toml Add integration for new bors 2023-09-28 10:43:24 +02:00
rustfmt.toml
triagebot.toml
x
x.ps1
x.py

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.