Disable f64 minimum/maximum tests for arm 32
This disables the f64 minimum/maximum tests for the arm-unknown-linux-gnueabihf job. The next release will be supporting cross-compiled doctests, and these tests fail on that platform.
It looks like this was just fixed via https://github.com/llvm/llvm-project/pull/142170, but I assume that will not trickle down to our copy of llvm in the next couple of weeks. Assuming that does get fixed when llvm is updated, then these can be removed.
cc https://github.com/rust-lang/rust/issues/141087
[rustdoc-json] Implement PartialOrd and Ord for rustdoc_types::Id
This allows consumers to create collections that required an ordering relationship for their keys—e.g. a `BTreeMap`.
Add `visit_id` to ast `Visitor`
This helps with efforts to deduplicate the `MutVisitor` and the `Visitor` code. All users of `Visitor`'s methods that have extra `NodeId` as parameters really just want to visit the id on its own.
Also includes some methods deduplicated and cleaned up as a result of this change.
r? oli-obk
Improve documentation for codegen options
This adds more information to many different codegen options. It should not add any new guarantees, just document existing behavior.
r? bjorn3
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.
closesrust-lang/rust#141748
r? bjorn3
This disables the f64 minimum/maximum tests for the
arm-unknown-linux-gnueabihf job. The next release will be supporting
cross-compiled doctests, and these tests fail on that platform.
It looks like this was just fixed via
https://github.com/llvm/llvm-project/pull/142170, but I assume that will
not trickle down to our copy of llvm in the next couple of weeks.
Assuming that does get fixed when llvm is updated, then these can be
removed.
cc https://github.com/rust-lang/rust/issues/141087
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`.
Fixesrust-lang/rust#141900.
`./x check --stage=0` in CI is intended for follow-up.
r? `@Mark-Simulacrum` (or bootstrap/libs)
cc `@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 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`
allow macro_use as first segment
Fixesrust-lang/rust#140255
This issue may raise a question: It's reasonable an external crate name or import target be legally named `macro_use`?
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`.
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
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.
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:
15825b7161/src/tools/generate-copyright/src/cargo_metadata.rs (L85-L88)
In Ferrocene's `run.sh` we set `CARGO_HOME` to be `build/cargo-home`: 96a45dd9a1/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.
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``
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``