Commit graph

269062 commits

Author SHA1 Message Date
Noah Bright
042f762200 Change futex_wait errno from Scalar to IoError
To shift more Scalars to IoErrors, implement this change, allowing
for a few other changes in the Linux and Windows shims. This also
requires introducing a WindowsError variant in the IoError enum
and implementing the VisitProvenance trait for IoErrors.
2024-10-30 14:26:19 -04:00
Oli Scherer
d581d802b1
Merge pull request #3998 from RalfJung/contrib
contributing guide: mention expectations around force pushes and squashing
2024-10-28 18:48:48 +00:00
Ralf Jung
6365ea10f4 contributing guide: mention expectations around force pushes and squashing 2024-10-28 15:14:11 +01:00
Ralf Jung
f736269dd5
Merge pull request #3992 from YohDeadfall/android-syscall
Android: Added syscall support
2024-10-28 09:50:39 +00:00
Yoh Deadfall
c8ce9e68d4 Android: Added syscall support 2024-10-28 12:05:10 +03:00
Ralf Jung
9023e35fc4
Merge pull request #3954 from Mandragorian/coverage-report
Add option for generating coverage reports
2024-10-28 05:37:58 +00:00
Konstantin Andrikopoulos
cdc40a40e8 Add option for generating coverage reports
Add a `--coverage` option in the `test` subcommand of the miri script.
This option, when set, will generate a coverage report after running the
tests.

`cargo-binutils` is needed as a dependency to generate the reports.
2024-10-27 23:58:58 +01:00
Ralf Jung
fb7bcd1baa
Merge pull request #3987 from TDecking/vpclmul
Implement LLVM x86 vpclmulqdq intrinsics
2024-10-27 20:54:15 +00:00
Oli Scherer
ca0e5df0a6
Merge pull request #3995 from RalfJung/readdir_r
fix error returned from readdir_r when isolation is enabled, and uses of raw_os_error
2024-10-26 16:01:50 +00:00
Tobias Decking
05530b6e10
Adjust the vpclmulqdq test case 2024-10-26 13:58:59 +02:00
Tobias Decking
9622a79378
Implement LLVM x86 vpclmulqdq intrinsics 2024-10-26 12:55:05 +02:00
Ralf Jung
4a34e2784b do not set the file type to an error code 2024-10-26 09:10:11 +02:00
Ralf Jung
3f763c776e do not use host 'raw_os_error' to compute target error code 2024-10-26 09:10:11 +02:00
Ralf Jung
72664f7760 fix error returned from readdir_r when isolation is enabled 2024-10-26 08:58:48 +02:00
Ralf Jung
d1530f0ed9
Merge pull request #3993 from RalfJung/dir-entry-drop-explicit
indicate more explicitly where we close host file/dir handles
2024-10-26 06:55:21 +00:00
Ben Kimock
d09fbe3e4e
Merge pull request #3994 from RalfJung/auto-pr
automatic PR: explain how to trigger CI
2024-10-26 05:49:24 +00:00
Ralf Jung
3ff01dd908 automatic PR: explain how to trigger CI 2024-10-26 07:23:51 +02:00
Ralf Jung
df9829c64d indicate more explicitly where we close host file/dir handles 2024-10-26 07:21:40 +02:00
Ralf Jung
3432b91bbc
Merge pull request #3989 from RalfJung/ci
CI workflow: tweak conclusion job
2024-10-25 14:50:10 +00:00
Ralf Jung
cbf6c86f56
Merge pull request #3990 from RalfJung/errno-cleanup
Consistently use io error handlers
2024-10-25 14:45:03 +00:00
Ralf Jung
2350ba7276 some more opportunities for set_last_error_and_return 2024-10-25 16:10:48 +02:00
Ralf Jung
82b041e356 get rid of fd_not_found; improve error handling in FileMetadata 2024-10-25 16:06:03 +02:00
Ralf Jung
e5d32b6757 CI workflow: tweak conclusion job 2024-10-25 15:26:44 +02:00
Ralf Jung
a21369fc21
Merge pull request #3984 from noahmbright/unix_shims
Clear `eval_libc` errors from unix shims
2024-10-25 13:19:48 +00:00
Noah Bright
c1004ff861 Clear more eval_libc errors from unix shims 2024-10-25 08:42:23 -04:00
Marco Ieni
340d2f7847
Merge pull request #3981 from Kobzol/ci-merge-queue
Switch CI to merge queues
2024-10-22 11:03:36 +00:00
Jakub Beránek
615822d0da
Switch CI to merge queues 2024-10-22 12:38:10 +02:00
bors
f8448f9e0c Auto merge of #3982 - RalfJung:epoll_ctl, r=RalfJung
epoll_ctl: throw unsupported error on unsupported opcode

`@tiif` this is a somewhat suspicious "return -1" without setting the `errno` -- what is the reasoning behind that?

Throwing a clear error seems better to me.
2024-10-22 08:21:37 +00:00
bors
3d9d393360 Auto merge of #3985 - rust-lang:rustup-2024-10-22, r=RalfJung
Automatic Rustup
2024-10-22 06:15:02 +00:00
The Miri Cronjob Bot
cd8c1234ce fmt 2024-10-22 05:08:45 +00:00
The Miri Cronjob Bot
865acc2e83 Merge from rustc 2024-10-22 05:07:39 +00:00
The Miri Cronjob Bot
499820a494 Preparing for merge from rustc 2024-10-22 04:59:47 +00:00
bors
814df6e50e Auto merge of #131840 - compiler-errors:impossible-maybe, r=lcnr
Dont consider predicates that may hold as impossible in `is_impossible_associated_item`

Use infer vars to account for ambiguities when considering if methods are impossible to instantiate for a given self type. Also while we're at it, let's use the new trait solver instead of `evaluate` since this is used in rustdoc.

r? lcnr
Fixes #131839
2024-10-21 22:58:44 +00:00
bors
4392847410 Auto merge of #131570 - ehuss:update-xcode, r=Mark-Simulacrum
(ci) Update macOS Xcode to 15

This updates the macOS builders to Xcode 15. The aarch64 images will be removing Xcode 14 and 16 very soon (https://github.com/actions/runner-images/issues/10703), so we will need to make the switch to continue operating. The linked issue also documents GitHub's new policy for how they will be updating Xcode in the future. Also worth being aware of is the future plans for x86 runners documented in https://github.com/actions/runner-images/issues/9255 and https://github.com/actions/runner-images/issues/10686, which will impact our future upgrade behaviors.

I decided to also update the Xcode in the x86_64 runners, even though they are not being removed. It felt better to me to have all macOS runners on the same (major) version of Xcode. However, note that the x86_64 runners do not have the latest version of 15 (15.4), so I left them at 15.2 (which is currently the default Xcode of the runner).

Xcode 15 was previously causing problems (see #121058) which seem to be resolved now. `@bjorn3` fixed the `invalid r_symbolnum` issue with cranelift. The issue with clang failing to link seems to be fixed, possibly by the update of the pre-built LLVM from 14 to llvm 15 in https://github.com/rust-lang/rust/pull/124850, or an update in our source version of LLVM. I have run some try builds and at least LLVM seems to build (I did not run any tests).

Closes #121058
2024-10-21 20:19:06 +00:00
Eric Huss
16b91e887a Update debuginfo test for newer lldb
For reasons I don't understand, lldb in Xcode 15 no longer prints objects as:

(long) $0 = 19

instead, it is printing them as:

(long) 19
2024-10-21 11:40:12 -07:00
bors
31e102c509 Auto merge of #132005 - matthiaskrgr:rollup-ced4upi, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #130350 (stabilize Strict Provenance and Exposed Provenance APIs)
 - #131737 (linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks)
 - #131991 (test: Add test for trait in FQS cast, issue #98565)
 - #131997 (Make `rustc_abi` compile on stable again)
 - #131999 (Improve test coverage for `unit_bindings` lint)
 - #132001 (fix coherence error for very large tuples™)
 - #132003 (update ABI compatibility docs for new option-like rules)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-21 17:33:42 +00:00
Matthias Krüger
64f4aa6725
Rollup merge of #132003 - RalfJung:abi-compat-docs, r=traviscross
update ABI compatibility docs for new option-like rules

Documents the rules decided [here](https://github.com/rust-lang/rust/pull/130628#issuecomment-2402761599) for our ABI compatibility rules.

Long-term this should be moved to the reference, but for now this is what we got.

Cc `@rust-lang/lang` `@rust-lang/opsem`
2024-10-21 18:11:23 +02:00
Matthias Krüger
780a8c32cc
Rollup merge of #132001 - lcnr:stabilize-coherence-again, r=compiler-errors
fix coherence error for very large tuples™

see https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/diesel.20error for an in-depth explanation of this issue. We once again specialize `NormalizesTo` goals to avoid the impact of erasing their expected term.

fixes #131969

r? `@compiler-errors`
2024-10-21 18:11:22 +02:00
Matthias Krüger
4aa07a7867
Rollup merge of #131999 - jieyouxu:unit-bindings, r=WaffleLapkin
Improve test coverage for `unit_bindings` lint

Follow-up to #112380, apparently at the time I didn't add much of any test coverage outside of just "generally works as intended on the test suites and in the crater run".

r? compiler
2024-10-21 18:11:22 +02:00
Matthias Krüger
d0c8d3eafe
Rollup merge of #131997 - Veykril:veykril/push-upvqkyxmvkzw, r=jieyouxu
Make `rustc_abi` compile on stable again

https://github.com/rust-lang/rust/pull/131473 accidentally broke this
2024-10-21 18:11:21 +02:00
Matthias Krüger
a9da2be010
Rollup merge of #131991 - jannden:issue-98565-test, r=jieyouxu
test: Add test for trait in FQS cast, issue #98565

Closes #98565 by adding a test to check for diagnostics when the built-in type `str` is used in a cast where a trait is expected.
2024-10-21 18:11:21 +02:00
Matthias Krüger
1cc8c8de95
Rollup merge of #131737 - jieyouxu:note-summary, r=ehuss
linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks

I spent an embarrassingly long amount of time trying to figure out why CI was failing for a PR adding new platform support docs. In turns out it's because the PR author didn't register the new page in `SUMMARY.md`. I completely forgot about it too, and was reading linkchecker source because I thought it was a bug in linkchecker.

So this PR adds a note to modify `SUMMARY.md` when adding new pages in a mdBook.

E.g.

```
# Adding a new `meow` target but forgor to register the page in `SUMMARY.md`
rustc\platform-support.html:183: broken link - `rustc\platform-support\meow.html`
rustc\print.html:9730: broken link - `rustc\platform-support\meow.html`
checked links in: 19.1s
number of HTML files scanned: 43588
number of HTML redirects found: 13735
number of links checked: 3145951
number of links ignored due to external: 156244
number of links ignored due to exceptions: 9
number of intra doc links ignored: 8
errors found: 2
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
found some broken links
```
2024-10-21 18:11:20 +02:00
Matthias Krüger
20b1dadf92
Rollup merge of #130350 - RalfJung:strict-provenance, r=dtolnay
stabilize Strict Provenance and Exposed Provenance APIs

Given that [RFC 3559](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html) has been accepted, t-lang has approved the concept of provenance to exist in the language. So I think it's time that we stabilize the strict provenance and exposed provenance APIs, and discuss provenance explicitly in the docs:
```rust
// core::ptr
pub const fn without_provenance<T>(addr: usize) -> *const T;
pub const fn dangling<T>() -> *const T;
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T;
pub const fn dangling_mut<T>() -> *mut T;
pub fn with_exposed_provenance<T>(addr: usize) -> *const T;
pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T;

impl<T: ?Sized> *const T {
    pub fn addr(self) -> usize;
    pub fn expose_provenance(self) -> usize;
    pub fn with_addr(self, addr: usize) -> Self;
    pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self;
}

impl<T: ?Sized> *mut T {
    pub fn addr(self) -> usize;
    pub fn expose_provenance(self) -> usize;
    pub fn with_addr(self, addr: usize) -> Self;
    pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self;
}

impl<T: ?Sized> NonNull<T> {
    pub fn addr(self) -> NonZero<usize>;
    pub fn with_addr(self, addr: NonZero<usize>) -> Self;
    pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self;
}
```

I also did a pass over the docs to adjust them, because this is no longer an "experiment". The `ptr` docs now discuss the concept of provenance in general, and then they go into the two families of APIs for dealing with provenance: Strict Provenance and Exposed Provenance. I removed the discussion of how pointers also have an associated "address space" -- that is not actually tracked in the pointer value, it is tracked in the type, so IMO it just distracts from the core point of provenance. I also adjusted the docs for `with_exposed_provenance` to make it clear that we cannot guarantee much about this function, it's all best-effort.

There are two unstable lints associated with the strict_provenance feature gate; I moved them to a new [strict_provenance_lints](https://github.com/rust-lang/rust/issues/130351) feature since I didn't want this PR to have an even bigger FCP. ;)

`@rust-lang/opsem` Would be great to get some feedback on the docs here. :)
Nominating for `@rust-lang/libs-api.`

Part of https://github.com/rust-lang/rust/issues/95228.

[FCP comment](https://github.com/rust-lang/rust/pull/130350#issuecomment-2395114536)
2024-10-21 18:11:19 +02:00
lcnr
919b61a6f4 don't bail when encountering many placeholders 2024-10-21 17:51:43 +02:00
Ralf Jung
e51eded01a epoll_ctl: throw unsupported error on unsupported opcode 2024-10-21 16:34:19 +01:00
Ralf Jung
75cadc09f2 update ABI compatibility docs for new option-like rules 2024-10-21 16:25:32 +01:00
bors
edbd9398dc Auto merge of #130987 - thejpster:revise-arm-platform-notes-soft-float, r=ehuss
Revise arm platform notes regarding soft float

This PR updates the Arm microcontroller platform docs to recommend `-fpregs` instead of `+soft-float` as [discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60-Ctarget-feature.3D.2Bsoft-float.60.20considered.20harmful)
2024-10-21 14:31:44 +00:00
lcnr
b64b25b99e normalizes-to disable infer var check 2024-10-21 16:25:42 +02:00
bors
695a1b67aa Auto merge of #3899 - YohDeadfall:prctl-thread-name, r=RalfJung
Android: Added support for prctl handling thread names

Addresses the first part of #3618.
2024-10-21 14:25:26 +00:00
Ralf Jung
56ee492a6e move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00