There is a difference between the `image` (the Dockerfile), the `name` of the job (which determines also its properties) and the `full_name`, which includes the `auto/try/pr` prefix.
Rollup of 3 pull requests
Successful merges:
- #134898 (Make it easier to run CI jobs locally)
- #135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible)
- #135261 (Account for identity substituted items in symbol mangling)
r? `@ghost`
`@rustbot` modify labels: rollup
Make `lit_to_mir_constant` and `lit_to_const` infallible
My motivation for this change is just that it's annoying to check everywhere, especially since all but one call site was just ICEing on errors anyway right there.
They can still fail, but now just return an error constant instead of having the caller handle the error.
fixes#114317fixes#126182
Make it easier to run CI jobs locally
This PR extends the Python CI script to perform a poor man's CI-like execution of a given CI job locally. It's not perfect, but it's better than nothing.
r? `@jieyouxu`
Rollup of 5 pull requests
Successful merges:
- #135212 (Remove outdated information in the `unreachable_pub` lint description)
- #135225 (Explicitly build proc macro test with panic=unwind)
- #135242 (add missing provenance APIs on NonNull)
- #135247 (Add a list of symbols for stable standard library crates)
- #135269 (Remove some unnecessary `.into()` calls)
r? `@ghost`
`@rustbot` modify labels: rollup
Add a list of symbols for stable standard library crates
There are a few locations where the crate name is checked against an enumerated list of `std`, `core`, `alloc`, and `proc_macro`, or some subset thereof. In most cases when we are looking for any "standard library" crate, all four crates should be treated the same. Change this so the crates are listed in one place, and that list is used wherever a list of `std` crates is needed.
`test` could be considered relevant in some of these cases, but generally treating it separate from the others seems preferable while it is unstable.
There are also a few places that Clippy will be able to use this.
add missing provenance APIs on NonNull
This adds some provenance APIs that exist on raw pointers but have been forgotten on `NonNull`:
```rust
impl<T> NonNull<T> {
pub const fn without_provenance(addr: NonZero<usize>) -> Self;
pub fn from_exposed_provenance(addr: NonZero<usize>) -> Self;
}
impl<T: ?Sized> NonNull<T> {
pub fn expose_provenance(self) -> NonZero<usize>;
}
```
https://github.com/rust-lang/libs-team/issues/518 is the ACP for the two exposed provenance ones; I forgot to include `without_provenance` there but I hope that, too, is uncontroversial (and anyway this PR only adds things unstably). Cc `@rust-lang/libs-api`
Tracking issue: https://github.com/rust-lang/rust/issues/135243
Explicitly build proc macro test with panic=unwind
Fuchsia explicitly builds rust and all rust targets with `-C panic=abort` to minimize code generation size. However, when compiling a proc-macro with this setting it can cause a warning to be emitted, which breaks `tests/ui/invalid-compile-flags/crate-type-flag.rs`. This hasn't been a problem in the past for us since we compile our proc macros on host, rather than inside Fuchsia.
This attempts to fix the issue by explicitly requiring that we're using the unwinder when compiling this test to avoid the warning being emitted.
Fixes#135223
Remove outdated information in the `unreachable_pub` lint description
As far as I understand the `unreachable_pub` lint hasn't had false-positives since it started using "effective visibilities". Let's remove that warning from the lint description.
r? `@petrochenkov`
[mir-opt] GVN some more transmute cases
We already did `Transmute`-then-`PtrToPtr`; this adds the nearly-identical `PtrToPtr`-then-`Transmute`.
It also adds `transmute(Foo(x))` → `transmute(x)`, when `Foo` is a single-field transparent type. That's useful for things like `NonNull { pointer: p }.as_ptr()`. It also detects when a `Transmute` is just an identity-for-the-value `PtrCast` between different raw pointer types, to help such things fold with other GVN passes.
Found these as I was looking at <https://github.com/rust-lang/compiler-team/issues/807>-related changes. This also removes the questionably-useful "turn a transmute into a field projection" part of instsimplify (which I added ages ago without an obvious need for it) since that would just put back the field projections that MCP807 is trying to ban.
r? mir-opt
Rollup of 6 pull requests
Successful merges:
- #128110 (Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions)
- #134609 (Add new `{x86_64,i686}-win7-windows-gnu` targets)
- #134875 (Implement `const Destruct` in old solver)
- #135221 (Include rustc and rustdoc book in replace-version-placeholder)
- #135231 (bootstrap: Add more comments to some of the test steps)
- #135256 (Move `mod cargo` below the import statements)
Failed merges:
- #135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible)
r? `@ghost`
`@rustbot` modify labels: rollup
bootstrap: Add more comments to some of the test steps
Some of the test steps have names that don't clearly indicate what they actually do.
While there is ongoing experimental work to actually rename the steps (e.g. #135071), that's dependent on figuring out what the new names should actually be. In the meantime, we can still improve things by adding comments to help describe the steps, which will remain useful even after any renaming.
Include rustc and rustdoc book in replace-version-placeholder
This PR includes the *(stable)* rustc and rustdoc books which might contain `CURRENT_RUSTC_VERSION` that should be replaced when branching beta. Include them so they are not forgotten.
I didn't include any other folder or books as they don't strike me as relevant for it and might be problematic in the future if some of the submodules are turned into subtree, because we have places where we wouldn't want to replace them.
cf. https://github.com/rust-lang/rust/pull/135163#issuecomment-2574694931
cc `@pietroalbini`