| commit | 3f4dc1e02d759aa3c3807d4efc1f7f6e293536a5 | [log] [tgz] |
|---|---|---|
| author | bors <[email protected]> | Sun Dec 14 04:20:26 2025 |
| committer | bors <[email protected]> | Sun Dec 14 04:20:26 2025 |
| tree | 21fad34d49827fa8ad5af4ef33045df2d87b2b78 | |
| parent | 2cd4ee6bcf517345dd76d7b102d56b2e873cddbc [diff] | |
| parent | 065e4c1c8a4701d605518f80b26bf031a22f3756 [diff] |
Auto merge of #146348 - jdonszelmann:eiiv3, r=lcnr,oli-obk Externally implementable items Supersedes https://github.com/rust-lang/rust/pull/140010 Tracking issue: https://github.com/rust-lang/rust/issues/125418 Getting started: ```rust #![feature(eii)] #[eii(eii1)] pub fn decl1(x: u64) // body optional (it's the default) { println!("default {x}"); } // in another crate, maybe #[eii1] pub fn decl2(x: u64) { println!("explicit {x}"); } fn main() { decl1(4); } ``` - tiny perf regression, underlying issue makes multiple things in the compiler slow, not just EII, planning to solve those separately. - No codegen_gcc support, they don't have bindings for weak symbols yet but could - No windows support yet for weak definitions This PR merges the implementation of EII for just llvm + not windows, doesn't yet contain like a new panic handler implementation or alloc handler. With this implementation, it would support implementing the panic handler in terms of EII already since it requires no default implementation so no weak symbols The PR has been open in various forms for about a year now, but I feel that having some implementation merged to build upon
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated 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).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
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.
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 Rust language trademark policy.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.