Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 14 pull requests #129721

Merged
merged 38 commits into from
Aug 29, 2024
Merged

Rollup of 14 pull requests #129721

merged 38 commits into from
Aug 29, 2024

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

artemagvanian and others added 30 commits August 16, 2024 14:28
Add various aarch64 features already supported by LLVM and Linux.

The features are marked as unstable using a newly added symbol, i.e.
aarch64_unstable_target_feature.

Additionally include some comment fixes to ensure consistency of
feature names with the Arm ARM and support for architecture version
target features up to v9.5a.

This commit adds compiler support for the following features:

- FEAT_CSSC
- FEAT_ECV
- FEAT_FAMINMAX
- FEAT_FLAGM2
- FEAT_FP8
- FEAT_FP8DOT2
- FEAT_FP8DOT4
- FEAT_FP8FMA
- FEAT_FPMR
- FEAT_HBC
- FEAT_LSE128
- FEAT_LSE2
- FEAT_LUT
- FEAT_MOPS
- FEAT_LRCPC3
- FEAT_SVE_B16B16
- FEAT_SVE2p1
- FEAT_WFxT
Add SME aarch64 features already supported by LLVM and Linux.

This commit adds compiler support for the following features:

- FEAT_SME
- FEAT_SME_F16F16
- FEAT_SME_F64F64
- FEAT_SME_F8F16
- FEAT_SME_F8F32
- FEAT_SME_FA64
- FEAT_SME_I16I64
- FEAT_SME_LUTv2
- FEAT_SME2
- FEAT_SME2p1
- FEAT_SSVE_FP8DOT2
- FEAT_SSVE_FP8DOT4
- FEAT_SSVE_FP8FMA
FEAT_FPMR has been removed from upstream LLVM as of LLVM 19.
Remove the feature from the target features list and temporarily hack
the LLVM codegen to always enable it until the minimum LLVM version is
bumped to 19.
Convert to_llvm_features to return Option<LLVMFeature> so that it can
return None if the requested feature is not available for the current
LLVM version.

Add match rules to filter out aarch64 features not available in LLVM 17.
Additionally, remove optional matching for +v8a given that the minimum LLVM version is now past 14.
A partial stabilization that only affects:
- AllocType<T>::new_uninit
- AllocType<T>::assume_init
- AllocType<[T]>::new_uninit_slice
- AllocType<[T]>::assume_init
where "AllocType" is Box, Rc, or Arc
```
error[E0282]: type annotations needed for `Box<_>`
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
   = note: this is an inference error on crate `time` caused by a change in Rust 1.80.0; update `time` to version `>=0.3.35`
```

Partially address rust-lang#127343.
Signed-off-by: Amjad Alsharafi <26300843+Amjad50@users.noreply.github.com>
rustc_target: Add various aarch64 features

Add various aarch64 features already supported by LLVM and Linux.
Additionally include some comment fixes to ensure consistency of feature names with the Arm ARM.
Compiler support for features added to stdarch by rust-lang/stdarch#1614.
Tracking issue for unstable aarch64 features is rust-lang#127764.

List of added features:

- FEAT_CSSC
- FEAT_ECV
- FEAT_FAMINMAX
- FEAT_FLAGM2
- FEAT_FP8
- FEAT_FP8DOT2
- FEAT_FP8DOT4
- FEAT_FP8FMA
- FEAT_HBC
- FEAT_LSE128
- FEAT_LSE2
- FEAT_LUT
- FEAT_MOPS
- FEAT_LRCPC3
- FEAT_SVE_B16B16
- FEAT_SVE2p1
- FEAT_WFxT
- FEAT_SME
- FEAT_SME_F16F16
- FEAT_SME_F64F64
- FEAT_SME_F8F16
- FEAT_SME_F8F32
- FEAT_SME_FA64
- FEAT_SME_I16I64
- FEAT_SME_LUTv2
- FEAT_SME2
- FEAT_SME2p1
- FEAT_SSVE_FP8DOT2
- FEAT_SSVE_FP8DOT4
- FEAT_SSVE_FP8FMA

FEAT_FPMR is added in the first commit and then removed in a separate one to highlight it being removed from upstream LLVM 19. The intention is for it to be detectable at runtime through stdarch but not have a corresponding Rust compile-time feature.
…celinval

Add an ability to convert between `Span` and `visit::Location`

AFAIK, there is no way to create a `Location` from a `Span` because its only field is private. This makes it impossible to use visitor methods like `visit_statement` or `visit_terminator`.

This PR adds an implementation for`From<Span>` for `Location` to fix this.

r? ```@celinval```
Emit specific message for time<=0.3.35

```
error[E0282]: type annotations needed for `Box<_>`
  --> /home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
   = note: this is an inference error on `time` caused by a change in Rust 1.80.0; update `time` to version `>=0.3.36`
```

Partially mitigate the fallout from rust-lang#127343. Although the biggest benefit of this would have been if we had had this in 1.80 before it became stable, the long-tail of that change will be felt for a *long* time, so better late than never.

We can also emit an even more targeted error instead of this inference failure.
Clean up cfg-gating of ProcessPrng extern

This removes a bit of duplication and is consistent with how `api-ms-win-core-synch-l1-2-0` externs are imported.
…ion-of-stabilization, r=dtolnay,joboet

Partially stabilize `feature(new_uninit)`

Finished comment period: rust-lang#63291 (comment)

The following API has been stabilized from rust-lang#63291

```rust
impl<T> Box<T> { pub fn new_uninit() -> Box<MaybeUninit<T>> {…} }
impl<T> Rc<T> { pub fn new_uninit() -> Rc<MaybeUninit<T>> {…} }
impl<T> Arc<T> { pub fn new_uninit() -> Arc<MaybeUninit<T>> {…} }

impl<T> Box<[T]> { pub fn new_uninit_slice(len: usize) -> Box<[MaybeUninit<T>]> {…} }
impl<T> Rc<[T]> { pub fn new_uninit_slice(len: usize) -> Rc<[MaybeUninit<T>]> {…} }
impl<T> Arc<[T]> { pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]> {…} }

impl<T> Box<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Box<T> {…} }
impl<T> Box<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Box<[T]> {…} }
impl<T> Rc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Rc<T> {…} }
impl<T> Rc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Rc<[T]> {…} }
impl<T> Arc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Arc<T> {…} }
impl<T> Arc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Arc<[T]> {…} }
```

The remaining API is split between new issues
- `new_zeroed_alloc`: rust-lang#129396
- `box_uninit_write`: rust-lang#129397

All relevant code is thus either stabilized or split out of that issue, so this closes rust-lang#63291 as, with the FCP concluded, that issue has served its purpose.

try-job: x86_64-rust-for-linux
…ax-pointee, r=compiler-errors

derive(SmartPointer): assume pointee from the single generic and better error messages

Fix rust-lang#129465

Actually RFC says that `#[pointee]` can be inferred when there is no ambiguity, or there is only one generic type parameter so to say.

cc ```@Darksonn```

r? ```@compiler-errors```
…adrieril

format code in tests/ui/threads-sendsync

was thinking of fixing formatting for 1 test in the directory, but found a bunch of them to also be in need
Update books

## rust-lang/book

4 commits in 04bc1396bb857f35b5dda1d773c9571e1f253304..e7d217be2a75ef1753f0988d6ccaba4d7e376259
2024-08-14 01:19:47 UTC to 2024-08-13 16:51:00 UTC

- Backport/forward port ch12 (rust-lang/book#4008)
- Found some more things to fix in ch7; I forgot to update the snapshot (rust-lang/book#4007)
- Remove redundant sentence. Send to nostarch (rust-lang/book#4006)
- Fix: typo (rust-lang/book#4003)

## rust-lang/edition-guide

5 commits in aeeb287d41a0332c210da122bea8e0e91844ab3e..eeba2cb9c37ab74118a4fb5e5233f7397e4a91f8
2024-08-19 23:28:06 UTC to 2024-08-15 15:12:33 UTC

- 2024: Add rustdoc combined doctests (rust-lang/edition-guide#320)
- Update for unsafe attributes stabilization (rust-lang/edition-guide#319)
- 2024: Add macro-fragment-specifiers. (rust-lang/edition-guide#312)
- Fix deprecated_safe_2024 link (rust-lang/edition-guide#317)
- Add 2024 unsafe functions (rust-lang/edition-guide#304)

## rust-embedded/book

1 commits in 019f3928d8b939ec71b63722dcc2e46330156441..ff5d61d56f11e1986bfa9652c6aff7731576c37d
2024-08-20 07:26:19 UTC to 2024-08-20 07:26:19 UTC

- Use aligned address to demonstrate HardFault (rust-embedded/book#374)

## rust-lang/nomicon

1 commits in 6ecf95c5f2bfa0e6314dfe282bf775fd1405f7e9..14649f15d232d509478206ee9ed5105641aa60d0
2024-08-14 14:49:09 UTC to 2024-08-14 14:49:09 UTC

- CI: Switch to merge queue (rust-lang/nomicon#459)

## rust-lang/reference

14 commits in 62cd0df95061ba0ac886333f5cd7f3012f149da1..0668397076da350c404dadcf07b6cbc433ad3743
2024-08-11 21:06:12 +0000 to 2024-08-27 21:47:20 +0000
- Update enum.md (rust-lang/reference#1354)
- Be consistent about how "Edition differences" is capitalized (rust-lang/reference#1586)
- Sync denied lints with upstream (rust-lang/reference#1589)
- const_eval: update for const-fn float stabilization (rust-lang/reference#1566)
- Add spec identifier syntax to destructors.md (rust-lang/reference#1571)
- Say that `pub(in path)` can't depend on `use` statements (rust-lang/reference#1559)
- bytes inside implicitly const-promoted expressions are immutable (rust-lang/reference#1554)
- Tweak `repr(transparent)` to mention requiring *at most* one non-1-ZST (rust-lang/reference#1568)
- operator expressions: add &raw (rust-lang/reference#1567)
- Rewrite the automatic std link translation, and switch to automatic links (rust-lang/reference#1578)
- Add some basic docs for unsafe attrs (rust-lang/reference#1539)
- don't capitalize Undefined Behavior (rust-lang/reference#1575)
- add the `const` operand to docs for inline assembly (rust-lang/reference#1556)
- Typo: 'a' to 'an' in type-coercions.md (rust-lang/reference#1572)

## rust-lang/rust-by-example

1 commits in 8f94061936e492159f4f6c09c0f917a7521893ff..859786c5bc99301bbc22fc631a5c2b341860da08
2024-08-26 10:30:48 UTC to 2024-08-26 10:30:48 UTC

- Update primitives.md with examples (rust-lang/rust-by-example#1878)

## rust-lang/rustc-dev-guide

7 commits in 43d83780db545a1ed6d45773312fc578987e3968..fa928a6d19e1666d8d811dfe3fd35cdad3b4e459
2024-08-26 14:46:50 UTC to 2024-08-12 21:07:49 UTC

- Fix x.py reference (rust-lang/rustc-dev-guide#2049)
- Update `stabilization_guide.md` (rust-lang/rustc-dev-guide#2034)
- Explain the internal `#[rustc_*]` TEST attributes used for debugging and inside tests (rust-lang/rustc-dev-guide#2046)
- missing char (rust-lang/rustc-dev-guide#2047)
- Replace direct http links to rustc-dev-guide.rust-lang.org (rust-lang/rustc-dev-guide#2044)
- Update index.html, 39. The MIR: fix typo (rust-lang/rustc-dev-guide#2043)
- Update LLVM docs (rust-lang/rustc-dev-guide#2039)
… r=dtolnay

Add fmt::Debug to sync::Weak<T, A>

Currently, `sync::Weak<T>` implements `Debug`, but `sync::Weak<T, A>` does not. This appears to be an oversight, as `rc::Weak<T, A>` implements `Debug`. (Note: `sync::Weak` is the weak for `Arc`, and `rc::Weak` is the weak for `Rc`.)

This PR adds the Debug trait for `sync::Weak<T, A>`. The issue was initially brought up here: rust-lang/wg-allocators#131
copysign with sign being a NaN can have non-portable results

Follow-up to rust-lang#129559.
Cc ```@tgross35``` ```@beetrees```

There's no portable variant we can recommend instead here, is there? Something with a semantics like "if `sign` is a NaN, then return `self` unaltered, otherwise return `self` with the sign changed to that of `sign`"?
…ichaelwoerister

Move `'tcx` lifetime off of impl and onto methods for `CrateMetadataRef`

Unconstrained type and const variables are not allowed, but unconstrained lifetimes are. This is not very good style, though, and it leads to unnecessary captures of a lifetime in edition 2024 (not that it matters, but it does trigger the edition migration lint).
…path, r=onur-ozkan

Fix path to run clippy on rustdoc

Took me a while to find out that the path clippy expected was `src/tools/rustdoc` and not `src/librustdoc`. I think it makes more sense this way as most commands rely on source paths.

r? ```@Kobzol```
…saethlin

Correct trusty targets to be tier 3

The Trusty targets were added in rust-lang#129490, but in that PR I accidentally marked them as tier 2. This PR corrects the target metadata to mark them as tier 3.
…r=tgross35

Update `compiler_builtins` to `0.1.123`

Includes rust-lang/compiler-builtins#680 and fixes rust-lang#128386.

Fixed by not including math symbols of `compiler_builtins` into any `unix` target or `wasi`, old behavior is restored

r? tgross35
@rustbot rustbot added O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 29, 2024
@workingjubilee
Copy link
Member Author

@bors rollup=never p=14 r+

@bors
Copy link
Contributor

bors commented Aug 29, 2024

📌 Commit bd66fad has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 29, 2024
@bors
Copy link
Contributor

bors commented Aug 29, 2024

⌛ Testing commit bd66fad with merge 6cf068d...

@bors
Copy link
Contributor

bors commented Aug 29, 2024

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing 6cf068d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 29, 2024
@bors bors merged commit 6cf068d into rust-lang:master Aug 29, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 29, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128192 rustc_target: Add various aarch64 features acede25deaaeef27396bf96badb4669e21a62701 (link)
#129170 Add an ability to convert between Span and `visit::Locati… a9577e63535900588b46f72c656ecb6ad72ed934 (link)
#129343 Emit specific message for time<=0.3.35 7b2894d9b1308ecab97e17072b8a732ce7ead4cb (link)
#129378 Clean up cfg-gating of ProcessPrng extern 907c476d9465bd43fa200409cf86f539ad7332eb (link)
#129401 Partially stabilize feature(new_uninit) 38aa235d54ebdafe93de6958951de5a52e7cea61 (link)
#129467 derive(SmartPointer): assume pointee from the single generi… 52c9ca0bb1b71c4330381721d231e53769cb1580 (link)
#129494 format code in tests/ui/threads-sendsync c881c4e1159048530878a094f6e06510fee8b921 (link)
#129617 Update books 56aa8b99fb7cfd9cc771bc7bcbbe52bdc603b160 (link)
#129673 Add fmt::Debug to sync::Weak<T, A> 70401b3882c7f3568094e423593406c9c544c22a (link)
#129683 copysign with sign being a NaN can have non-portable results 7d753e8428be58e2d6b871187ac698ea3e79c1bf (link)
#129689 Move 'tcx lifetime off of impl and onto methods for `Crat… da917cb7435650f45339df16a9055fdca5731086 (link)
#129695 Fix path to run clippy on rustdoc 94b94ed3435b93eb703ed4b2d0ba49a1f70e1eb6 (link)
#129712 Correct trusty targets to be tier 3 e89b2d47da95514ede716dc3ebfae99b38aa2f49 (link)
#129715 Update compiler_builtins to 0.1.123 1e3dfb59eb4a8e5cf77b0ecfdf458d232132460d (link)

previous master: acb4e8b625

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6cf068d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.6%, secondary 2.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
2.4% [1.0%, 3.8%] 2
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [-1.0%, 2.1%] 2

Cycles

Results (secondary 2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 8

Bootstrap: 791.393s -> 791.88s (0.06%)
Artifact size: 339.00 MiB -> 338.70 MiB (-0.09%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.