| Age | Commit message (Collapse) | Author | Lines |
|
tools-aux ci runner: also cross-test doctests in Miri
Miri now supports running doctests across different targets. Let's use that to run the std doctests on aarch64-apple-darwin, i686-pc-windows-msvc.
try-job: x86_64-gnu-aux
|
|
Warn when gold was used as the linker
gold has been deprecated recently and is known to behave incorrectly around Rust programs, including miscompiling `#[used(linker)]`. Tell people to switch to a different linker instead.
closes rust-lang/rust#141748
r? bjorn3
|
|
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#141767 (ci: use free runner for aarch64-gnu-llvm-19-1 PR job)
- rust-lang/rust#141858 (Fix typo in `StructuralPartialEq` docs)
- rust-lang/rust#141865 (Optionally don't steal the THIR)
- rust-lang/rust#141874 (add f16_epsilon and f128_epsilon diagnostic items)
- rust-lang/rust#141904 (test-float-parse: apply `cfg(not(bootstrap))`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#141884 (allow macro_use as first segment)
- rust-lang/rust#141885 ([RTE-484] Update SGX maintainers)
- rust-lang/rust#141892 (Fix false positive lint error from no_implicit_prelude attr)
- rust-lang/rust#141894 (rustc-dev-guide subtree update)
- rust-lang/rust#141895 (tshepang has a new email)
- rust-lang/rust#141897 (Fix citool tests when executed locally)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
test-float-parse: apply `cfg(not(bootstrap))`
Prior to stage 0 redesign, `test-float-parse` ran against in-tree std but now it runs against beta std. `f16::FromStr` is only present in in-tree std and not yet beta std, so apply `cfg(not(bootstrap))` gating to unbrick `./x check --stage=0`.
Fixes rust-lang/rust#141900.
`./x check --stage=0` in CI is intended for follow-up.
r? `@Mark-Simulacrum` (or bootstrap/libs)
cc `@tgross35`
|
|
add f16_epsilon and f128_epsilon diagnostic items
cc https://github.com/rust-lang/rust/issues/116909
r? ``@tgross35``
|
|
Optionally don't steal the THIR
The THIR being stolen is a recurrent pain for authors of rustc drivers. This makes it optional, so that the `thir_body` query can still be used after analysis of the crate has completed.
|
|
Fix typo in `StructuralPartialEq` docs
`equialent` => `equivalent`
|
|
ci: use free runner for aarch64-gnu-llvm-19-1 PR job
|
|
Fix citool tests when executed locally
They couldn't be executed locally before due to some additional environment reads.
I also investigated the annoying rebuilds that we see on CI all the time, and they are caused by `ring`'s build script. It should be fixed in the next ring release (https://github.com/briansmith/ring/issues/2525), so we can just wait for that and then update `ring`.
r? `@marcoieni`
|
|
tshepang has a new email
|
|
rustc-dev-guide subtree update
r? `@ghost`
|
|
r=petrochenkov
Fix false positive lint error from no_implicit_prelude attr
Fixes rust-lang/rust#141785
r? `@petrochenkov`
|
|
r=Noratrieb
[RTE-484] Update SGX maintainers
`@mzohreva` is no longer with Fortanix. We need to change the SGX maintainers accordingly.
|
|
allow macro_use as first segment
Fixes rust-lang/rust#140255
This issue may raise a question: It's reasonable an external crate name or import target be legally named `macro_use`?
|
|
Clippy subtree update
r? `@Manishearth`
|
|
Prior to stage 0 redesign, `test-float-parse` ran against in-tree std
but now it runs against beta std. `f16::FromStr` were only present in
in-tree std and not yet beta std, so apply `cfg(not(bootstrap))` gating
to unbrick `./x check --stage=0`.
|
|
They couldn't be executed locally before due to some additional environment reads.
|
|
|
|
Fix link to GatherBorrows
|
|
Add opaque type attributes
|
|
|
|
Rustc pull update
|
|
Trivial: fix typo (change `foo` to `bar`)
|
|
|
|
There is no `foo` symbol in the preceding example. I assume the method `bar` is meant.
|
|
r=albertlarsan68,jieyouxu,mark-simulacrum,kobzol,jyn514,Noratrieb,WaffleLapkin,RalfJung,bjorn3
redesign stage 0 std
### Summary
**Blog post: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/**
This PR changes how bootstrap builds the stage 1 compiler by switching to precompiled stage 0 standard library instead of building the in-tree one. The goal was to update bootstrap to use the beta standard library at stage 0 rather than compiling it from source (see the motivation at https://github.com/rust-lang/compiler-team/issues/619).
Previously, to build a stage 1 compiler bootstrap followed this path:
```
download stage0 compiler -> build in-tree std -> compile stage1 compiler with in-tree std
```
With this PR, the new path is:
```
download stage0 compiler -> compile stage1 compiler with precompiled stage0 std
```
This also means that `cfg(bootstrap)`/`cfg(not(bootstrap))` is no longer needed for library development.
### Building "library"
Since stage0 `std` is no longer in-tree `x build/test/check library --stage 0` is now no-op. The minimum supported stage to build `std` is now 1. For the same reason, default stage values in the library profile is no longer 0.
Because building the in-tree library now requires a stage1 compiler, I highly recommend library developers to enable `download-rustc` to speed up compilation time.
<hr>
**Blog post: https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/**
If you encounter a bug or unexpected results please open a topic in the [#t-infra/bootstrap](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap) Zulip channel or create a [bootstrap issue](https://github.com/rust-lang/rust/issues/new?template=bootstrap.md).
(Review thread: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Review.20thread.3A.20stage.200.20redesign.20PR/with/508271433)
~~Blocked on https://github.com/rust-lang/rust/pull/122709~~
try-job: dist-x86_64-linux
try-job: `x86_64-msvc*`
try-job: `x86_64-apple-*`
try-job: `aarch64-apple`
try-job: x86_64-gnu
try-job: `x86_64-gnu-llvm*`
|
|
Merge coroutine obligation checking into borrowck parallel loop
r? `@ghost`
attempts at increasing parallelism in parallel rustc by merging parallel blocks that run in sequence
|
|
|
|
|
|
Improve intrinsic handling in cg_ssa (part 2)
* Avoid computing function type and signature for intrinsics where possible
* Nicer handling of bool returning intrinsics
Follow up to https://github.com/rust-lang/rust/pull/141404
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#140370 (Improve diagnostics for usage of qualified paths within tuple struct exprs/pats)
- rust-lang/rust#141224 (terminology: allocated object → allocation)
- rust-lang/rust#141622 (implement `va_arg` for `powerpc`)
- rust-lang/rust#141666 (source_span_for_markdown_range: fix utf8 violation)
- rust-lang/rust#141789 (Exclude `CARGO_HOME` from `generate-copyright` in-tree determination)
- rust-lang/rust#141823 (Drive-by refactor: use `OnceCell` for the reverse region SCC graph)
- rust-lang/rust#141834 (Add unimplemented `current_dll_path()` for WASI)
- rust-lang/rust#141846 (Fix TLS model on bootstrap for cygwin)
- rust-lang/rust#141852 (resolve if-let-chain FIXME on bootstrap)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
resolve if-let-chain FIXME on bootstrap
self-explanatory
|
|
Fix TLS model on bootstrap for cygwin
There aren't other targets that both use emutls and enable `has_thread_local`, so cygwin triggers this bug first.
r? mati865
See: https://github.com/rust-lang/rust/pull/141719#issuecomment-2925445263
``@jeremyd2019`` Could you check if this PR fixes the issue? I just found my pre-built stage-0 rustc was too old to build the current rustc :(
|
|
Add unimplemented `current_dll_path()` for WASI
This is the only change needed to Rust to allow compiling rustfmt for WASI (rustfmt uses some internal rustc crates).
|
|
Drive-by refactor: use `OnceCell` for the reverse region SCC graph
During region inference, the reverse SCC region graph is sometimes computed lazily. This changes the implementation for that from using an `Option` to a `OnceCell` which clearly communicates the intention and simplifies the code somewhat.
There shouldn't be any performance impact, except that this pulls the computation of the reverse SCC graph slightly later than before, and so may avoid computing it in some instances.
Note that this changes a mutable reference into an immutable (interior mutable) one.
|
|
ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789
Exclude `CARGO_HOME` from `generate-copyright` in-tree determination
On Ferrocene, we noticed that in our releases the out-of-tree notices were not being included. When `x.py run generate-copyright` was ran on local development machines, it worked fine.
After some investigations ``@tshepang`` and I determined that the problem was that the cargo registry (located in `CARGO_HOME`) started with the source directory on CI jobs, and was being excluded by this line:
https://github.com/rust-lang/rust/blob/15825b7161f8bd6a3482211fbf6727a52aa1166b/src/tools/generate-copyright/src/cargo_metadata.rs#L85-L88
In Ferrocene's `run.sh` we set `CARGO_HOME` to be `build/cargo-home`: https://github.com/ferrocene/ferrocene/blob/96a45dd9a18c6e54d3cd81750a78fe459fa48af0/ferrocene/ci/run.sh#L34-L46 which caused this issue.
This PR passes the `CARGO_HOME` variable to the `generate-copyright` tool and expands the consideration of in-tree-ness to be aware of `CARGO_HOME`. It is an upstreaming of https://github.com/ferrocene/ferrocene/pull/1491.
## Testing
Run `CARGO_HOME=build/cargo-home ./x.py run generate-copyright` on `master`, then check `build/host/doc/COPYRIGHT` and look for out of tree dependencies (at the bottom).
Then, try running the same command in this branch.
|
|
lolbinarycat:rustdoc-source_span_for_markdown_range-bug-141665, r=GuillaumeGomez
source_span_for_markdown_range: fix utf8 violation
it is non-trivial to reproduce this bug through rustdoc, which uses this function less than clippy, so the regression test was added as a unit test instead of an integration test.
fixes https://github.com/rust-lang/rust/issues/141665
r? ``@GuillaumeGomez``
|
|
implement `va_arg` for `powerpc`
tracking issue: https://github.com/rust-lang/rust/issues/44930
The llvm `va_arg` implementation is well-known to have serious limitations. Some planned changes to rust's `VaList` make it much more likely that LLVM miscompiles `va_arg`, so this PR adds support for the various powerpc targets. Now at least the targets that `core` has explicit support for will continue to work.
For `powerpc` (the 32-bit variant) this implementation also fixes a bug where only up to 20 variadic arguments were supported.
Locally (with qemu), these targets now pass the tests in https://github.com/rust-lang/rust/blob/master/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs. That test does not actually run for the powerpc targets in CI though.
The implementation is based on clang:
- handling of big endian architectures https://github.com/llvm/llvm-project/blob/3c8089d1ea53232d5a7cdc33f0cb43ef7d6f723b/clang/lib/CodeGen/ABIInfoImpl.cpp#L191-L193
- 64-bit https://github.com/llvm/llvm-project/blob/3c8089d1ea53232d5a7cdc33f0cb43ef7d6f723b/clang/lib/CodeGen/Targets/PPC.cpp#L969
- 32-bit https://github.com/llvm/llvm-project/blob/3c8089d1ea53232d5a7cdc33f0cb43ef7d6f723b/clang/lib/CodeGen/Targets/PPC.cpp#L430
cc `@daltenty` (target maintainer)
r? `@workingjubilee`
`@rustbot` label: +F-c_variadic
|
|
terminology: allocated object → allocation
Rust does not have "objects" in memory so "allocated object" is a somewhat odd name. I am not sure where the term comes from. "object" has been used to refer to allocations already [in 1.0 docs](https://doc.rust-lang.org/1.0.0/std/primitive.pointer.html#method.offset); this was apparently later changed to "allocated object".
"Allocation" is already the terminology used in Miri and in the [UCG](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#allocation). We should properly move to that terminology, and avoid any confusion about whether Rust has an object memory model. (It does not. Memory contains untyped bytes.)
Cc ``@rust-lang/opsem`` ``@rust-lang/lang``
|
|
Improve diagnostics for usage of qualified paths within tuple struct exprs/pats
For patterns the old diagnostic was just incorrect, but I also added machine applicable suggestions.
For context, this special cases errors for `<T as Trait>::Assoc(..)` patterns and expressions (latter is just a call). Tuple struct patterns and expressions both live in the value namespace, so they are not forwarded through associated *types*.
r? ``@jdonszelmann``
cc ``@petrochenkov`` in https://github.com/rust-lang/rust/pull/80080#issuecomment-800630582 you were wondering why it doesn't work for types, that's why — tuple patterns are resolved in the value namespace.
|
|
|
|
Miri subtree update
r? `@ghost`
Includes https://github.com/rust-lang/miri/pull/4370 to unbreak PR CI. (So we're committing to having bda28aa38 in the Miri history by landing this, whether or not that Miri PR lands.)
Cc `@Noratrieb` `@tiif`
|
|
|
|
`equialent` => `equivalent`
|
|
Tokio `AsyncWriteExt::write` doesn't actually ensure that the contents
have written, it just *starts* the write operation. To ensure that the
file has actually been written, we need to `sync_all` first.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Tweak fast path trait handling
(1.) Make it more sound by considering polarity (lol)
(2.) Make it more general, by considering higher-ranked size/copy/clone
(2.) Make it less observable, by only doing copy/clone fast path if there are no regions involved
r? lcnr
|
|
Fix tokio/file-io.rs test relying on `read`/`write` not being short
|