Skip to content

Rollup of 9 pull requests #131711

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

Closed
wants to merge 24 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Mark-Simulacrum and others added 24 commits October 1, 2024 21:04
This is an attempt to gain the performance loss after the PR rust-lang#131140.
Here the related objects are `IndexSet` so do not require a sort to stay stable.
This special case in `output_base_dir` had the unfortunate side-effect of
causing all run-make tests to share the same `stamp` file. So as soon as any
one of them succeeded, all of the failed tests would be considered up-to-date
and would no longer run in subsequent test invocations.
`utcnow()` is deprecated in favor of passing a timezone to `now()`. `utcnow()` would return a tz-naive datetime, while this returns a tz-aware datetime. For the purposes of the formatting we do, these are the same.
Some float methods are now `const fn` under the `const_float_methods` feature gate.

In order to support `min`, `max`, `abs` and `copysign`, the implementation of some intrinsics had to be moved from Miri to rustc_const_eval.
…ror, r=compiler-errors

Fix bug where `option_env!` would return `None` when env var is present but not valid Unicode

Fixes rust-lang#122669 by making `option_env!` emit an error when the value of the environment variable is not valid Unicode.
…alfJung,tgross35

Make some float methods unstable `const fn`

Some float methods are now `const fn` under the `const_float_methods` feature gate.

I also made some unstable methods `const fn`, keeping their constness under their respective feature gate.

In order to support `min`, `max`, `abs` and `copysign`, the implementation of some intrinsics had to be moved from Miri to rustc_const_eval (cc ``@RalfJung).``

Tracking issue: rust-lang#130843

```rust
impl <float> {
    // #[feature(const_float_methods)]
    pub const fn recip(self) -> Self;
    pub const fn to_degrees(self) -> Self;
    pub const fn to_radians(self) -> Self;
    pub const fn max(self, other: Self) -> Self;
    pub const fn min(self, other: Self) -> Self;
    pub const fn clamp(self, min: Self, max: Self) -> Self;
    pub const fn abs(self) -> Self;
    pub const fn signum(self) -> Self;
    pub const fn copysign(self, sign: Self) -> Self;

    // #[feature(float_minimum_maximum)]
    pub const fn maximum(self, other: Self) -> Self;
    pub const fn minimum(self, other: Self) -> Self;

    // Only f16/f128 (f32/f64 already const)
    pub const fn is_sign_positive(self) -> bool;
    pub const fn is_sign_negative(self) -> bool;
    pub const fn next_up(self) -> Self;
    pub const fn next_down(self) -> Self;
}
```

r? libs-api
Add 1.82 release notes

cc ``@rust-lang/release``

This is using the new release notes infrastructure. My expectation is that most and/or all edits should be made separately from this PR by updating various relnote tracking issues, and then we'll re-run the relnotes tool. That probably comes with an exception for the stabilized APIs for std, which will need to be manually added at the end.
…rts-in-rustc-hir-analysis, r=compiler-errors

Remove unnecessary sorts in `rustc_hir_analysis`

A follow-up after rust-lang#131140. Here the related objects are `IndexSet` so do not require a sort to stay stable. And they don't need to be `mut` anymore.

r? ``@compiler-errors``
…eril,jieyouxu

Move polarity into `PolyTraitRef` rather than storing it on the side

Arguably we could move these modifiers into `TraitRef` instead of `PolyTraitRef`, but I see `TraitRef` as simply the *path* part of the trait ref. It doesn't really matter -- refactoring this further is much easier now.
…age, r=compiler-errors

Update lint message for ABI not supported

Tracking issue: rust-lang#130260

As requested in rust-lang#128784 (review) I updated the error message.

I could also change it to be the same message as if it was a hard error on a normal function:

> "`{abi}` is not a supported ABI for the current target"

Or would that get confusing when people try to google the error message?

r? compiler-errors
…youxu

Fix up-to-date checking for run-make tests

This special case in `output_base_dir` had the unfortunate side-effect of causing all run-make tests to share the same `stamp` file. So as soon as any one of them succeeded, all of the failed tests would be incorrectly considered up-to-date and would no longer run in subsequent test invocations.

Fixes rust-lang#129971.

r? jieyouxu
Resolved python deprecation warning in publish_toolstate.py

`utcnow()` is deprecated in favor of passing a timezone to `now()`. `utcnow()` would return a tz-naive datetime, while this returns a tz-aware datetime. For the purposes of the formatting we do, these are the same.
Fix two const-hacks

Fix two pieces of code marked `FIXME(const-hack)` related to const_option rust-lang#67441.
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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) labels Oct 14, 2024
@rustbot rustbot added 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. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 14, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Collaborator

bors commented Oct 14, 2024

📌 Commit 2fa07c7 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 Oct 14, 2024
@bors
Copy link
Collaborator

bors commented Oct 15, 2024

⌛ Testing commit 2fa07c7 with merge eed0e12...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 15, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#122670 (Fix bug where `option_env!` would return `None` when env var is present but not valid Unicode)
 - rust-lang#130568 (Make some float methods unstable `const fn`)
 - rust-lang#131137 (Add 1.82 release notes)
 - rust-lang#131328 (Remove unnecessary sorts in `rustc_hir_analysis`)
 - rust-lang#131652 (Move polarity into `PolyTraitRef` rather than storing it on the side)
 - rust-lang#131675 (Update lint message for ABI not supported)
 - rust-lang#131681 (Fix up-to-date checking for run-make tests)
 - rust-lang#131703 (Resolved python deprecation warning in publish_toolstate.py)
 - rust-lang#131706 (Fix two const-hacks)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-s390x-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc-std-workspace-alloc v1.99.0 (/checkout/library/rustc-std-workspace-alloc)
   Compiling panic_unwind v0.0.0 (/checkout/library/panic_unwind)
[RUSTC-TIMING] rustc_std_workspace_alloc test:false 0.027
   Compiling gimli v0.29.0
rustc-LLVM ERROR: Cannot select: 0x7fc34458bd10: f32 = fp16_to_fp 0x7fc34458ba70
  0x7fc34458ba70: i32 = fp_to_fp16 0x7fc34458b0d0
    0x7fc34458b0d0: f32,ch = CopyFromReg 0x7fc34490cbf8, Register:f32 %1
      0x7fc34458b7d0: f32 = Register %1
In function: _ZN4core3f1621_$LT$impl$u20$f16$GT$5clamp15assert_at_const17h0a21f61a7a1319afE
   Compiling miniz_oxide v0.7.4
[RUSTC-TIMING] core test:false 16.804
error: could not compile `core` (lib)
warning: build failed, waiting for other jobs to finish...

@bors
Copy link
Collaborator

bors commented Oct 15, 2024

💔 Test failed - checks-actions

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

2024-10-15T01:28:03.7030089Z rustc-LLVM ERROR: Cannot select: 0x7fc34458bd10: f32 = fp16_to_fp 0x7fc34458ba70
2024-10-15T01:28:03.7031272Z   0x7fc34458ba70: i32 = fp_to_fp16 0x7fc34458b0d0
2024-10-15T01:28:03.7032292Z     0x7fc34458b0d0: f32,ch = CopyFromReg 0x7fc34490cbf8, Register:f32 %1
2024-10-15T01:28:03.7033231Z       0x7fc34458b7d0: f32 = Register %1
2024-10-15T01:28:03.7034318Z In function: _ZN4core3f1621_$LT$impl$u20$f16$GT$5clamp15assert_at_const17h0a21f61a7a1319afE

that seems bad

@jieyouxu jieyouxu closed this Oct 15, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-an3kr9k branch January 25, 2025 09:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows rollup A PR which is a rollup 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. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.