Repository navigation
Rollup of 12 pull requests - #165480
Closed
jhpratt wants to merge 40 commits into
Closed
Rollup of 12 pull requests#165480jhpratt wants to merge 40 commits into
jhpratt wants to merge 40 commits into
Conversation
This reduces the amount of special casing #[no_mangle] needs in the rest of the compiler.
#[link_ordinal] is not compatible with #[link_name] and items in extern blocks now have an implicit #[link_name] with the item name. Alternatively it would be possible to suppress the error message for this implicit #[link_name].
Co-authored-by: Ralf Jung <post@ralfj.de>
Windows has a similar flag `/forceInterlockedFunctions`, which uses names such as `_InterlockedAdd64_rel`. This is a re-land of 1ed1b6e ("Enable `outline-atomics` by default on AArch64 Windows platforms").
Per LLVM commit c5e7e64 ("[AArch64][Clang][Linux] Enable out-of-line atomics by default.") [1], Clang enables these on Android. Thus, do the same in Rust. This is a re-land of c455903 ("Enable `outline-atomics` by default on AArch64 Android"). [1]: llvm/llvm-project@c5e7e649d537067de
Clang has done this by default since LLVM commit 1a963d3 ("[Driver] Make -moutline-atomics default for aarch64-fuchsia targets"), [1], so do the same here. This is a re-land of 21525f8 ("Enable `outline-atomics` by default on AArch64 Fuchsia"). [1]: llvm/llvm-project@1a963d3
Clang has recently started doing this, as of LLVM commit 5d774ec8d183
("[Driver] Enable outline atomics for OpenBSD/aarch64") [1]. Thus, do
the same here.
This is a re-land of 66c150c ("Enable `outline-atomics` by default
on AArch64 OpenBSD").
[1]: llvm/llvm-project@5d774ec
Many aarch64 targets without LSE in the baseline enable the `outline-atomics` feature, which uses runtime detection of LSE for its faster atomic ops. This provides nontrivial performance improvements on most hardware from the past decade, at a small cost to anything pre-LSE. This matches what Clang does [1]. This is a re-land of 383053e ("Enable `outline-atomics` by default on AArch64 FreeBSD"). [1]: llvm/llvm-project@e24f901
```
note: method defined here, with 0 generic parameters
--> $DIR/ufcs-qpath-missing-params.rs:4:8
|
LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
LL | fn into_cow(self) -> Cow<'a, B>;
| ^^^^^^^^
```
Since L4Re currently has no openat support, the dir module used in the metadata function is not available to use.
…=ShoyuVanilla Fancy paramenv accessors that communicate the access pattern better. r? @lcnr or @rust-lang/initiative-trait-system-refactor This is a single commit, to precede the future change of "compressed trait clauses". It adds a lot of the infrastructure, without making any real changes that may affect performance. As such it forms a separately reviewable step. Even though this isn't on its own such a useful change, it mostly refactors things, it does still make for a nicer API surface. Importantly, with compressed trait clauses (i.e. encoding some common traits as `where self_ty : <bitset of common traits>`), it becomes very important to be careful with how we iterate over caller bounds. I've tried other methods, but the typestate API (as proposed in this PR) is the only one I've found that's both ergonomic, and still allows for implementing compressed trait clauses performantly. > [!NOTE] > I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
…res, r=davidtwco turn ABI-controlling target features into a target modifier This makes it so that we can mark "internal" target features (which we track as target features in the compiler but do not expose as such to the user) as target modifiers, to be *really* sure that they are set consistently across all targets. For instance, if there was a value for `-Ctarget-cpu` that affected ABI-relevant target features, we'd catch mismatches in the value of that target feature. For now, this just complements the ABI check logic in `abi_required_features`, but I think long-term it might even be able to fully replace that logic. This would, for example, let us check consistency of the SPARC ABI (rust-lang#160562) without introducing a new variant for `RustcAbi`. OTOH having the ABI represented explicitly is often useful elsewhere in the compiler (e.g. for inline asm) so we may also want to keep both `abi_required_features` and this new concept of "target features that must be consistent across all crates". We could also eventually turn the target modifier into a safety net: if `abi_required_features` violations are a hard error and `-Ctarget-feature` is locked down to reject non-Rust target features, it should be impossible to ever violate the new target modifier check. Cc @Darksonn @workingjubilee
…gjubilee Re-enable outline-atomics by default on more AArch64 platforms These originally landed in rust-lang#144938 and rust-lang#149633, then were reverted in rust-lang#151896 due to rust-lang#151486. As that issue has been resolved, re-enable them here. There is a lot of additional context at the original PR (rust-lang#144938) and the Zulip discussion leading up to it [#t-compiler > outline-atomics on non-Linux targets](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/outline-atomics.20on.20non-Linux.20targets/with/537964562).
…m, r=joboet Deprecate internal function `vec::from_elem` This is only used internally and is only public because we didn't used to have the ability to gate internal functions used in public macros (other than using `doc(hidden)` to hide it).
… r=wesleywiser Add tests for `-Zcrate-attr` edition and position This PR adds new tests for `-Z crate-attr`: - first we check that the edition of the crate attributes is the same as `--edition` - second we add a test for `file!()`, `line!()` and `column!()` Note that [contrary to RFC](https://github.com/rust-lang/rfcs/blob/main/text/3791-crate-attr.md#spans-modules-and-editions) we currently consider `#![` and `]` relevant.
[tiny] Show context for found assoc item in E0107
The first code line is new:
```
note: method defined here, with 0 generic parameters
--> $DIR/ufcs-qpath-missing-params.rs:4:8
|
LL | pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
LL | fn into_cow(self) -> Cow<'a, B>;
| ^^^^^^^^
```
std: Fix build for the L4Re targets Since L4Re currently has no openat support, the dir module used in the metadata function is not available to use.
…maxdexh Add BTreeMap::allocator and BTreeSet::allocator Added an api extension `BTreeMap::allocator` the same way `Vec`, `VecDeque` and `BinaryHeap` have it. Tracking issue [rust-lang#163177](rust-lang#163177) Using a custom allocator with `BTreeMap<K, V, A>` currently needs both `btreemap_alloc` and `allocator_ext`. Should `btreemap_alloc` be folded into `allocator_ext`? r? @nia-e
…s, r=workingjubilee Don't "exit" using `panic` on teeos Fixes rust-lang#162847 On teeos, calling `exit` is not expected. There is also no `main` to implicitly exit, as the target exclusively uses dylibs. Currently, calling `std::process::exit` on `teeos` calls `cleanup`, which calls `unimplemented`. It doesn't make sense to "fail" to exit this way, as it just calls the user-controlled panic hook, which may keep the program alive for longer. This PR makes it abort instead.
Member
Author
|
@bors r+ p=5 force |
Contributor
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
This pull request was unapproved due to being closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
BuilderMethods::store#165468 (Remove return type fromBuilderMethods::store)vec::from_elem#164653 (Deprecate internal functionvec::from_elem)-Zcrate-attredition and position #165429 (Add tests for-Zcrate-attredition and position)panicon teeos #165466 (Don't "exit" usingpanicon teeos)r? @ghost
Create a similar rollup