Jump threading stores values as `u128` (`ScalarInt`) and does its
comparisons for equality as integer comparisons.
This works great for integers. Sadly, not everything is an integer.
Floats famously have wonky equality semantcs, with `NaN!=NaN` and
`0.0 == -0.0`. This does not match our beautiful integer bitpattern
equality and therefore causes things to go horribly wrong.
While jump threading could be extended to support floats by remembering
that they're floats in the value state and handling them properly,
it's signficantly easier to just disable it for now.
[beta] Clippy backport
r? `@Mark-Simulacrum`
Really small backport this time:
- https://github.com/rust-lang/rust-clippy/pull/12961
Fixes a quite annoying bug of this lint, that got into the last stable release 1.79.0. There were already 3 issues opened about it in the Clippy repo. It would be great to get this fixed for the next stable release.
I confirmed that this commit is already part of `master`
Don't allow unsafe statics outside of extern blocks (beta version)
This PR fixes a regression where we allowed `unsafe static` items in top-level modules (i.e. outside of `unsafe extern` blocks).
#127943 does not rebase cleanly, so I've prepared an extremely pared down version of this PR for beta purposes.
Fix incorrect suggestion for `manual_unwrap_or_default`
Fixes#12928.
If this not a "simple" pattern, better not emit the lint.
changelog: Fix incorrect suggestion for `manual_unwrap_or_default`
binutils 2.40 is required by LLVM 19, as older versions do not
know about the zmmull extension.
I've had to backport some patches to glibc and gcc as well,
as they don't build with binutils 2.40. Alternatively, we could
also switch to glibc 2.35 and gcc 12 (I think). I figured we'd
want to avoid the glibc version change, but if that's fine for
riscv I can go with that instead.
[beta] backports
- Properly gate `safe` keyword in pre-expansion #126757
- Switch back `non_local_definitions` lint to allow-by-default #127015
- Stall computing instance for drop shim until it has no unsubstituted const params #127068
- Update LLVM submodule #127190
- Change to the NetBSD archive URL rather than the CDN #127232
r? cuviper
The CDN has been down for a few hours. Switch to an alternative for the
time being so we can unblock CI.
It appears that the CDN is quite a bit faster, so we will likely want to
switch back when available.
(cherry picked from commit 42ac903f4f)
as request T-lang is requesting some major changes in the lint inner
workings in #126768#issuecomment-2192634762
(cherry picked from commit 0c0dfb88ee)
[beta] backports
- Only compute `specializes` query if (min)specialization is enabled in the crate of the specializing impl #126139
- Add pub struct with allow(dead_code) into worklist #126315
- ci: Update centos:7 to use vault repos #126352
r? cuviper
CentOS 7 is going EOL on June 30, after which its package repos will no
longer exist on the regular mirrors. We'll still be able to access
packages from the vault server though, and can start doing so now. This
affects `dist-i686-linux` and `dist-x86_64-linux`.
I also removed `epel-release` because we were only using that for its
`cmake3`, but we've been building our own version for a while.
(cherry picked from commit 6d2493bf5d)
[beta] backports and stage0 bump
- Bump stage0 to 1.79.0
- Do not define opaque types when selecting impls #126258
- Remove failing GUI test to stop blocking CI until it is fixed#126445
r? cuviper
[beta] Ensure self-contained linker is only enabled on dev/nightly
It seems the self-contained linker is enabled on beta. Let's fix that.
```console
$ cargo clean && cargo +beta build && readelf -p .comment target/debug/helloworld
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
String dump of section '.comment':
[ 0] Linker: LLD 18.1.7
[ 14] GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
[ 3f] rustc version 1.80.0-beta.1 (75ac3b633 2024-06-10)
```
I will open a PR to fix it on master as well, right after I test CI's behavior on beta.
Rollup of 11 pull requests
Successful merges:
- #124012 (Stabilize `binary_heap_as_slice`)
- #124214 (Parse unsafe attributes)
- #125572 (Detect pub structs never constructed and unused associated constants)
- #125781 (prefer `compile::stream_cargo` for building tools)
- #126030 (Update `./x fmt` command in library/std/src/sys/pal/windows/c/README.md)
- #126047 (Simplify the rayon calls in the installer)
- #126052 (More `rustc_parse` cleanups)
- #126077 (Revert "Use the HIR instead of mir_keys for determining whether something will have a MIR body.")
- #126089 (Stabilize Option::take_if)
- #126112 (Clean up source root in run-make tests)
- #126119 (Improve docs for using custom paths with `--emit`)
r? `@ghost`
`@rustbot` modify labels: rollup
Improve docs for using custom paths with `--emit`
Recently I found myself concluding that this feature didn't exist (https://github.com/rust-lang/rust/pull/126111#discussion_r1630707215), despite having read the documentation, because it was hidden away in the middle of a paragraph full of other information.
Giving this documentation more space of its own should make it easier to find.
Clean up source root in run-make tests
The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).
Related issue: https://github.com/rust-lang/rust/issues/126071
r? ```@jieyouxu```
Revert "Use the HIR instead of mir_keys for determining whether something will have a MIR body."
This reverts commit e5cba17b84.
turns out SMIR still needs it (https://github.com/model-checking/kani/issues/3218). I'll create a full plan and MCP for what I intended this to be a part of. Maybe my plan is nonsense anyway.