Skip to content

Rollup of 11 pull requests #134201

New issue

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

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

Already on GitHub? # to your account

Merged
merged 25 commits into from
Dec 12, 2024
Merged

Rollup of 11 pull requests #134201

merged 25 commits into from
Dec 12, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mati865 and others added 25 commits October 3, 2024 22:59
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Unit tests directly inside of standard library crates require a very
fragile way of building that is hard to reproduce outside of bootstrap.
`rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to
`ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and
`AbstractType` are both unit types. There is also has a trait `Lift` to
convert a `PlaceElem` to an `AbstractElem`.

But `rustc_mir_middle` already has a typedef `ProjectionKind` that is
equal to `ProjectionElem<(), ()>`, which is equivalent to
`AbstractElem`. So this commit reuses `ProjectionKind` in
`rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift`
trait.
Adding it did not cause any error. Most of this falls back on Unix already.

See rust-lang#127747
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
It's just a synonym for `Diag` that adds no value and is only used in a
few places.
…=petrochenkov

link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets

Alternative to rust-lang#121794

```
$ cargo b -r
    Finished `release` profile [optimized] target(s) in 0.38s

$ ntldd target/release/hello.exe | rg unwind
        libunwind.dll => H:\msys64\clang64\bin\libunwind.dll (0x0000020c35df0000)

$ RUSTFLAGS="-C target-feature=+crt-static" cargo b -r
    Finished `release` profile [optimized] target(s) in 0.23s

$ ntldd target/release/hello.exe | rg unwind
```
…=tgross35

Move some alloc tests to the alloctests crate

Unit tests directly inside of standard library crates require a very fragile way of building that is hard to reproduce outside of bootstrap.
Some asm! diagnostic adjustments and a papercut fix

Best reviewed commit by commit.

We forgot a `normalize` call in intrinsic checking, causing us to allow literal integers, but not named constants containing that literal. This can in theory affect stable code, but only if libstd contains a stable SIMD type that has an array length that is a named constant. I'd assume we'd have noticed by now due to asm! rejecting those outright.

The error message left me scratching my head for a bit, so I added some extra information to the diagnostic, too.
…affleLapkin

Properly consider APITs for never type fallback ascription fix

Fixes rust-lang#133842
…aflow-abs_domain, r=compiler-errors

Simplify `rustc_mir_dataflow::abs_domain`.

`rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to `ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and `AbstractType` are both unit types. There is also has a trait `Lift` to convert a `PlaceElem` to an `AbstractElem`.

But `rustc_mir_middle` already has a typedef `ProjectionKind` that is equal to `ProjectionElem<(), ()>`, which is equivalent to `AbstractElem`. So this commit reuses `ProjectionKind` in `rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift` trait.

r? ``@pnkfelix``
…mpiler-errors

suppress field expr with generics error message if it's a method

Don't emit "field expressions may not have generic arguments" if it's a method call without `()`

r? estebank
Fixes rust-lang#67680

Is this the best way to go? It's by far the simplest I could come up with.
…=tgross35

Forbid `unsafe_op_in_unsafe_fn` for Hurd

Tracking issue rust-lang#127747
…ing-literal, r=jieyouxu

allow `symbol_intern_string_literal` lint in test modules

Since rust-lang#133545, `x check compiler --stage 1` no longer works because compiler test modules trigger `symbol_intern_string_literal` lint errors. Bootstrap shouldn't control when to ignore or enable this lint in the compiler tree (using `Kind != Test` was ineffective for obvious reasons).

Also, conditionally adding this rustflag invalidates the build cache between `x test` and other commands.

This PR removes the `Kind` check from bootstrap and handles it directly in the compiler tree in a more natural way.
…anieu,traviscross,tgross35

Stabilize the Rust 2024 prelude

This stabilizes the `core::prelude::rust_2024` and `std::prelude::rust_2024` modules. I missed these in the rust-lang#133349 stabilization.
…r=workingjubilee

Remove outdated consteval note from `<*mut T>::align_offset` docs.
Remove `PErr`.

It's just a synonym for `Diag` that adds no value and is only used in a few places.

r? ``@spastorino``
@rustbot rustbot added 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 Dec 12, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Collaborator

bors commented Dec 12, 2024

📌 Commit 2ced8b3 has been approved by matthiaskrgr

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 Dec 12, 2024
@bors
Copy link
Collaborator

bors commented Dec 12, 2024

⌛ Testing commit 2ced8b3 with merge 4606a4d...

@bors
Copy link
Collaborator

bors commented Dec 12, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 4606a4d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 12, 2024
@bors bors merged commit 4606a4d into rust-lang:master Dec 12, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 12, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#122003 link libunwind dynamically and allow controlling it via `cr… fdb5ac862010128b3e8c72848d0a7becb9beb6e0 (link)
#133859 Move some alloc tests to the alloctests crate 3b38593f808f496ab256addbfe5c75acc81fbf17 (link)
#134070 Some asm! diagnostic adjustments and a papercut fix 226273c40e37c2eda6e5c8ff78eedbcc3c4e7f85 (link)
#134144 Properly consider APITs for never type fallback ascription … dcf678fbbb62754d4d08f34e7603f342ac453900 (link)
#134152 Simplify rustc_mir_dataflow::abs_domain. 80bbd288421d2c79195dc52afd6bd35682d628af (link)
#134154 suppress field expr with generics error message if it's a m… 4008ac4762dd1fa923c576c6faba81cabd376adb (link)
#134155 Forbid unsafe_op_in_unsafe_fn for Hurd 79d29c9911d66afcd3cdd462dbd52c6d7eab9a9c (link)
#134173 allow symbol_intern_string_literal lint in test modules 547805363b5ed2e77a7ab37fb1d44588be266cd5 (link)
#134178 Stabilize the Rust 2024 prelude 70915224b7479cce93dd2d0d46a9f0e18b9885e2 (link)
#134179 Remove outdated consteval note from `<*mut T>::align_offset… 6c5c54acd5c5976cca5a4f43f1179d365594baa2 (link)
#134187 Remove PErr. 622c47f5fe221438dc09b9b91172b2fa1f660185 (link)

previous master: 903d2976fd

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 (4606a4d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.5%, secondary -3.8%)

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)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) 3.5% [3.5%, 3.5%] 1

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 769.893s -> 771.193s (0.17%)
Artifact size: 331.00 MiB -> 331.00 MiB (0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-22b721y branch January 25, 2025 09:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.