Commit graph

254363 commits

Author SHA1 Message Date
Ralf Jung
067e33d701 housekeeping: update dependencies 2024-05-05 15:31:13 +02:00
bors
12b98de202 Auto merge of #3568 - RalfJung:pthread-thread_t, r=RalfJung
unix/thread: properly use pthread_t for thread IDs

This makes basic concurrency work on Solarish.
2024-05-05 13:16:41 +00:00
Ralf Jung
5b6df92d54 unix/thread: properly use pthread_t for thread IDs 2024-05-05 15:12:23 +02:00
bors
06e88c306a Auto merge of #123125 - gurry:122561-bad-note-non-zero-loop-iters-2, r=estebank
Remove suggestion about iteration count in coerce

Fixes #122561

The iteration count-centric suggestion was implemented in PR #100094, but it was based on the wrong assumption that the type mismatch error depends on the number of times the loop iterates. As it turns out, that is not true (see this comment for details: https://github.com/rust-lang/rust/pull/122679#issuecomment-2017432531)

This PR attempts to remedy the situation by changing the suggestion from the one centered on iteration count to a simple suggestion to add a return value.

It should also fix #100285 by simply making it redundant.
2024-05-05 12:51:37 +00:00
Urgau
f90b15b7fc Add rustfmt cfg to well known cfgs list 2024-05-05 14:30:35 +02:00
bors
a479ed6dcb Auto merge of #3564 - RalfJung:pthread-sync, r=RalfJung
pthread shims: reorganize field offset handling, and add sanity checks
2024-05-05 12:25:40 +00:00
Ralf Jung
e5597b20c4 sanity-check the pthread offsets against the static initializers 2024-05-05 14:24:21 +02:00
Ralf Jung
ba1a00af15 pthread shims: reorganize field offset handling 2024-05-05 13:35:07 +02:00
bors
fd8f9a6428 Auto merge of #3198 - devnexen:solarish_support, r=RalfJung
illumos support
2024-05-05 11:08:24 +00:00
David Carlier
b4011a08e8 illumos support. 2024-05-05 12:52:47 +01:00
Caleb Sander
43c8e139fd compiler: upgrade time from 0.3.34 to 0.3.36
This ensures the version of time used in rustc includes this change:
https://github.com/time-rs/time/pull/671.
This fix is a necessary prerequisite for #99969,
which adds FromIterator implementations for Box<str>.
Previously, time had an Into::into that resolved to the identity impl
followed by a collect::<Result<Box<_>, _>>().
With the new FromIterator implementations for Box<str>,
the Into::into resolution is ambiguous and time fails to compile.
The fix removes the identity Into::into conversion,
allowing time to compile with the new FromIterator implementations.
This version of time also matches what cargo recently switched to
in https://github.com/rust-lang/cargo/pull/13834.
2024-05-04 21:18:41 -07:00
bors
02f7806ecd Auto merge of #124606 - scottmcm:less-expect, r=cjgillot
Stop `llvm.expect`ing assert terminators

We're putting `llvm.expect` calls before the <https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.TerminatorKind.html#variant.Assert> terminators.

But we don't need them.  One of the arms is always to a panic function that's marked `#[cold]`, which is `cold` <https://llvm.org/docs/LangRef.html#function-attributes> in LLVM, which

> When computing edge weights, basic blocks post-dominated by a cold function call are also considered to be cold; and, thus, given low weight.

So even without us emitting the extra intrinsic call, LLVM knows what to expect for the `br`.  Thus we can save the (small) effort of emitting it and then LLVM optimizing it out.

r? compiler
2024-05-05 01:06:22 +00:00
Alex H
5aa2f9a208
Make f128 docs mention lack of any normal platform support
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>

Update library/core/src/primitive_docs.rs

Remove orphaned doc link and clean up grammar a bit

Update library/core/src/primitive_docs.rs
2024-05-04 14:51:55 -07:00
Alex H
3ef25288a4
Make f16 and f128 docs clearer on platform support
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>

Update library/core/src/primitive_docs.rs

Rewrite f16 and f128 hw support comments to match PR feedback

I wrote RISC-V allcaps in all cases, and wrote amd64 lowercase in all
cases, im not sure if either is the more correct way for either
platform, thats just how I normally write them, if theres a precedent
elsewhere it should probably be changed to match though.

Update library/core/src/primitive_docs.rs

Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>

Update library/core/src/primitive_docs.rs

Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>

Update library/core/src/primitive_docs.rs
2024-05-04 14:51:35 -07:00
Alex H
e30ad6ff2c
Tgross feedback tweaks
Co-authored-by: Trevor Gross <t.gross35@gmail.com>

Update library/core/src/primitive_docs.rs

Co-authored-by: Trevor Gross <t.gross35@gmail.com>

Update library/core/src/primitive_docs.rs
2024-05-04 14:51:13 -07:00
bors
e3fe30d828 Auto merge of #3563 - RalfJung:rustup, r=RalfJung
Rustup
2024-05-04 20:53:13 +00:00
Ralf Jung
745e3f224c make ExitProcess Windows-only 2024-05-04 22:50:51 +02:00
Ralf Jung
85e061af8f fix/extend some comments 2024-05-04 22:48:02 +02:00
bors
e82c861d7e Auto merge of #124726 - matthiaskrgr:rollup-m6i3day, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #124501 (add support to override lldb binary path for ./x test)
 - #124573 (add a reference link to the comment of the "cc" and "cmake".)
 - #124663 (Enable reusing CI Docker cache when running CI images locally)
 - #124690 (Only consider ambiguous goals when finding best obligation for ambiguities)
 - #124713 (Update Cargo specific diagnostics in check-cfg)
 - #124717 (Implement `do_not_recommend` in the new solver)
 - #124718 (Record impl args in the proof tree)
 - #124720 (interpret: Drop: always evaluate place)
 - #124721 (library/std: Fix build for NetBSD targets with 32-bit `c_long`)
 - #124723 (Use correct Hermit links in The `rustc` Book)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-04 20:46:48 +00:00
Ralf Jung
ef5a574af4 rustc_pull: explain order of operations 2024-05-04 22:44:56 +02:00
Ralf Jung
8db37a3cb5 Merge from rustc 2024-05-04 22:44:01 +02:00
Ralf Jung
89e828889a Preparing for merge from rustc 2024-05-04 22:28:57 +02:00
Matthias Krüger
e1867404a8
Rollup merge of #124723 - onkoe:issue-124722-fix, r=workingjubilee
Use correct Hermit links in The `rustc` Book

As is, this documentation links to the old Hermit organization, `hermitcore`, which isn't used anymore.

I've updated the links to point to the new organization. This PR also changes the incorrect "rusty loader" link to point to the new `hermit-rs-template` repo.

(fixes #124722)
2024-05-04 22:27:34 +02:00
Matthias Krüger
4577b1a7d3
Rollup merge of #124721 - ids1024:netbsd-32-bit-ulong, r=workingjubilee
library/std: Fix build for NetBSD targets with 32-bit `c_long`

This fixes building `std` for targets like `mipsel-unknown-netbsd`.

If `c_long` is an `i64`, this conversion works with `Into`. But if it's an `i32`, this failed to convert a `u32` to an `i32`.
2024-05-04 22:27:34 +02:00
Matthias Krüger
5d413c111a
Rollup merge of #124720 - RalfJung:interpret-drop, r=compiler-errors
interpret: Drop: always evaluate place

That way we can also avoid dealing with `instantiate_from_frame_and_normalize_erasing_regions`.
2024-05-04 22:27:33 +02:00
Matthias Krüger
07dc4aa837
Rollup merge of #124718 - compiler-errors:record-impl-args, r=lcnr
Record impl args in the proof tree

Weren't recording these since they went through a different infcx method

r? lcnr
2024-05-04 22:27:33 +02:00
Matthias Krüger
79071ee3a9
Rollup merge of #124717 - compiler-errors:do-not-recomment-next-solver, r=lcnr
Implement `do_not_recommend` in the new solver

Put the test into `diagnostic_namespace` test folder even though it's not in the diagnostic namespace, because it should be soon.

r? lcnr
cc `@weiznich`
2024-05-04 22:27:32 +02:00
Matthias Krüger
6ece08f41f
Rollup merge of #124713 - Urgau:check-cfg-update-cargo-diagnostics, r=jieyouxu
Update Cargo specific diagnostics in check-cfg

This PR updates the Cargo specific diagnostics for check-cfg/`unexpected_cfgs` lint.

Specifically it update to new url and use the double-column (instead of one) in the Cargo directive suggestion.

`@rustbot` label +F-check-cfg
cc `@weihanglo`
2024-05-04 22:27:32 +02:00
Matthias Krüger
7fbfd8d770
Rollup merge of #124690 - compiler-errors:only-ambig-if-ambig, r=lcnr
Only consider ambiguous goals when finding best obligation for ambiguities

We don't care about ambiguous goals when reporting true errors, and vice versa for ambiguities.

r? lcnr
2024-05-04 22:27:31 +02:00
Matthias Krüger
f4d0776b4f
Rollup merge of #124663 - Kobzol:docker-local-download, r=Mark-Simulacrum
Enable reusing CI Docker cache when running CI images locally

When running a CI image locally, e.g. using `DEPLOY=1 src/ci/docker/run.sh dist-x86_64-linux`, it can take a long time until the Docker image is built, which is annoying.

Since we now use proper Docker caching on CI, it should be possible to just `docker pull` the prebuilt image to reuse the cache. We didn't want to do this on CI, since our caching key isn't perfect and it's possible that we can miss some changes, but I think that for local usage it is fine (we could introduce some env. var. to force disable the image download, if needed).

r? `@Mark-Simulacrum`
2024-05-04 22:27:31 +02:00
Matthias Krüger
bad5382346
Rollup merge of #124573 - onur-ozkan:update-dep-comment, r=Mark-Simulacrum
add a reference link to the comment of the "cc" and "cmake".

Having a reference link provides more context for the problems of bumping cc and cmake.
2024-05-04 22:27:30 +02:00
Matthias Krüger
43a5e3fb95
Rollup merge of #124501 - VladimirMakaev:add-lldb-to-config-toml, r=Mark-Simulacrum
add support to override lldb binary path for ./x test

When running debuginfo tests I couldn't set custom build of lldb. The `src/bootstrap/src/core/build_steps/test.rs` has "lldb" hardcoded. I ended up hacking `src/bootstrap/src/core/build_steps/test.rs` just to get the tests running the way I wanted.

Then I've found out that we can override `gdb` under [build] section. This PR enables the same for `lldb`
2024-05-04 22:27:30 +02:00
barrett
3abefa17fb
docs(hermit): Explain Hermit's template link
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2024-05-04 14:53:08 -05:00
bors
82a8059755 Auto merge of #3562 - RalfJung:unsupported, r=RalfJung
only show the 'basic API common for this target' message when this is a missing foreign function

Follow-up to https://github.com/rust-lang/miri/pull/3558
2024-05-04 18:58:20 +00:00
Ralf Jung
cdf3f3c202 only show the 'basic API common for this target' message when this is a missing foreign function 2024-05-04 20:56:51 +02:00
Barrett
da961a8b92 fix(docs): Correct Hermit links to loader + 'rusty-demo'
Both are renamed! Sorry for the initial incorrect commit,
but this should correct it. 😄
2024-05-04 13:39:38 -05:00
Barrett
eade8365b1 docs(fix): incorrect Hermit links in the rustc book
the Hermit team seems to have moved from `hermitcore` to
`hermit-os` on GitHub. this change corrects the old links on its
target page.
2024-05-04 13:28:25 -05:00
Ian Douglas Scott
7dc27d596b library/std: Fix build for NetBSD targets with 32-bit c_long
This fixes building `std` for targets like `mipsel-unknown-netbsd`.

If `c_long` is an `i64`, this conversion works with `Into`. But if it's
an `i32`, this failed to convert a `u32` to an `i32`.
2024-05-04 11:27:21 -07:00
bors
d568423a7a Auto merge of #124716 - matthiaskrgr:rollup-ni58ie1, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #122441 (Improve several `Read` implementations)
 - #124584 (Various improvements to entrypoint code)
 - #124699 (Use `unchecked_sub` in `split_at`)
 - #124715 (interpret, miri: uniform treatments of intrinsics/functions with and without return block)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-04 18:18:42 +00:00
Ralf Jung
f0dee6bbe5 some comments or dynamic drop handling 2024-05-04 20:04:01 +02:00
Ralf Jung
86a933a574 interpret: Drop: always evaluate place 2024-05-04 19:59:11 +02:00
Vladimir Makaev
79e09a6fc5 Added an entry for "lldb" in config.example.toml 2024-05-04 17:55:19 +00:00
bors
d0e77727b1 Auto merge of #3561 - RalfJung:rustup, r=RalfJung
Rustup
2024-05-04 17:36:03 +00:00
bors
7eda989cc9 Auto merge of #3557 - RalfJung:getaffinity, r=RalfJung
Move sched_getaffinity back to Linux

This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f. The shim isn't actually useful for anything, and it is untested on FreeBSD. On Linux it exists solely because std and num_cpus are trying this before falling back to `sysconf`, but on FreeBSD that's not how they work, so there's no reason I can see to have this stub shim on FreeBSD.
2024-05-04 17:11:02 +00:00
Ralf Jung
a040df7e4e remove some dead code 2024-05-04 19:09:40 +02:00
Michael Goulet
50338aa59a Record impl args in the proof tree 2024-05-04 12:57:01 -04:00
Michael Goulet
b33599485b Implement do_not_recommend in the new solver 2024-05-04 12:51:10 -04:00
Ralf Jung
c6e273cccd bless and fmt 2024-05-04 18:40:02 +02:00
Ralf Jung
0c989293ce Merge from rustc 2024-05-04 18:37:35 +02:00
Ralf Jung
adb74ae486 Preparing for merge from rustc 2024-05-04 18:37:23 +02:00