Commit Graph

261151 Commits

Author SHA1 Message Date
Oneirical
d6a3f65db0 rewrite extern-fn-struct-passing-abi to rmake 2024-07-17 15:33:07 -04:00
Oneirical
a795d8998d rewrite and rename issue-25581 2024-07-17 15:33:06 -04:00
Oneirical
a47ca19134 rewrite extern-fn-with-extern-types to rmake 2024-07-17 15:33:05 -04:00
bors
fcc325f1bc Auto merge of #125942 - timokroeger:windows-once-futex, r=ChrisDenton
Windows: Use futex implementation for `Once`

Keep the queue implementation for win7.
Inspired by PR #121956

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->
2024-07-17 19:28:24 +00:00
Guillaume Gomez
213782dd71 Format cg_gcc with same formatting parameters 2024-07-17 20:22:07 +02:00
Guillaume Gomez
12bedc3e2b Ignore files in cg_gcc example folder 2024-07-17 20:21:52 +02:00
Guillaume Gomez
261d92c07d Align cg_gcc rustfmt.toml with rust's 2024-07-17 20:17:44 +02:00
Guillaume Gomez
e1852d0a3c Unignore cg_gcc fmt 2024-07-17 20:15:03 +02:00
Trevor Gross
f3f0b57264 Commonize uname -m results for aarch64 in docker runner
`uname -m` on Linux reports `aarch64`, but on MacOS reports `arm64`.
Commonize this to `aarch64`.

With this fix, it is now possible to run aarch64 CI docker images on Arm
MacOS.
2024-07-17 12:04:59 -05:00
bors
f00f850919 Auto merge of #127760 - jieyouxu:rmake-support-reorganize, r=Kobzol
Reorganize the `run-make-support` library

The `run_make_support` library has a kitchen sink `lib.rs` that make discovery/learning very difficult. Let's try to improve that by breaking up `lib.rs` into smaller more organized modules. This is a precursor to improving the documentation and learnability of the `run_make_support` library.

### Changes

- Breakup `lib.rs` into smaller modules according to functionality
- Rename `recursive_diff` -> `assert_dirs_are_equal`
- Rename one of the `read_dir` with callback interface as `read_dir_entries`
- Coalesced fs-related stuff onto a `fs` module, re-exported to tests as `rfs`
- Minor doc improvements / fixes in a few places (I have a follow-up documentation PR planned)

This PR is best reviewed commit-by-commit.

r? `@Kobzol` (or Mark, or T-compiler or T-bootstrap)

try-job: x86_64-msvc
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: dist-x86_64-linux
2024-07-17 15:52:03 +00:00
Augie Fackler
72e22554ca cleanup: remove support for 3DNow! cpu features
In llvm/llvm-project@f0eb5587ce all
support for 3DNow! intrinsics and instructions were removed. Per the commit message
there, only AMD chips between 1998 and 2011 or so actually supported
these instructions, and they were effectively replaced by SSE which was
available on many more chips. I'd be very surprised if anyone had ever
used these from Rust.
2024-07-17 11:45:02 -04:00
Michael Goulet
b84e2b7c98 Put the dots back 2024-07-17 11:08:28 -04:00
Michael Goulet
1d40d4c4f4 Fix precise capturing suggestion for hidden type when APITs are involved 2024-07-17 10:52:13 -04:00
Michael Goulet
0b5ce54bc2 Fix relations 2024-07-17 10:46:10 -04:00
Michael Goulet
8d90f442ca tcx -> cx in rustc_type_ir 2024-07-17 10:46:10 -04:00
Michael Goulet
a6510507e7 lift_to_tcx -> lift_to_interner 2024-07-17 10:46:10 -04:00
Matthias Krüger
2ea21cfd42
Rollup merge of #127855 - chenyukang:yukang-add-triagebot, r=jieyouxu
Add myself to review rotation

r? `@wesleywiser`
2024-07-17 16:22:33 +02:00
Matthias Krüger
1e1e64f10f
Rollup merge of #127844 - chenyukang:yukang-fix-type-bound-127555, r=jieyouxu
Remove invalid further restricting suggestion for type bound

This PR partially addresses #127555, it will remove the obvious error suggestion:

```console
   |                      ^^^^ required by this bound in `<Baz as Foo>::bar`
help: consider further restricting this bound
   |
12 |         F: FnMut() + Send + std::marker::Send,
   |                           +++++++++++++++++++
```

I may create another PR to get a better diagnostic for `impl has stricter requirements than trait` scenario.
2024-07-17 16:22:32 +02:00
Matthias Krüger
9db57bf0c9
Rollup merge of #127769 - compiler-errors:ed-2024-dep, r=oli-obk
Don't use implicit features in `Cargo.toml` in `compiler/`

Fixes compiler crates to stop using implicit features (https://github.com/rust-lang/cargo/issues/12826) which are denied in in edition 2024.
2024-07-17 16:22:31 +02:00
Matthias Krüger
23dd3a099c
Rollup merge of #127579 - surechen:fix_127285, r=lcnr
Solve a error `.clone()` suggestion when moving a mutable reference

If the moved value is a mut reference, it is used in a generic function and it's type is a generic param, suggest it can be reborrowed to avoid moving.

for example:

```rust
struct Y(u32);
// x's type is '& mut Y' and it is used in `fn generic<T>(x: T) {}`.
fn generic<T>(x: T) {}
```

fixes #127285
2024-07-17 16:22:29 +02:00
Matthias Krüger
c98487e3be
Rollup merge of #127472 - Zalathar:block-and-unit, r=fmease
MIR building: Stop using `unpack!` for `BlockAnd<()>`

This is a subset of #127416, containing only the parts related to `BlockAnd<()>`.

The first patch removes the non-assigning form of the `unpack!` macro, because it is frustratingly inconsistent with the main form. We can replace it with an ordinary method that discards the `()` and returns the block.

The second patch then finds all of the remaining code that was using `unpack!` with `BlockAnd<()>`, and updates it to use that new method instead.

---

Changes since original review of #127416:
- Renamed `fn unpack_block` → `fn into_block`
- Removed `fn unpack_discard`, replacing it with `let _: BlockAnd<()> = ...` (2 occurrences)
- Tweaked `arm_end_blocks` to unpack earlier and build `Vec<BasicBlock>` instead of `Vec<BlockAnd<()>>`
2024-07-17 16:22:28 +02:00
Matthias Krüger
3ddfd97198
Rollup merge of #127337 - celinval:intrinsics-fallback, r=oli-obk
Move a few intrinsics to Rust abi

Move a few more intrinsic functions to the convention added in #121192. In the second commit, I added documentation about their safety requirements. Let me know if you would like me to move the second commit to a different PR.

Note: I kept the same signature of `pref_align_of`, but I was wondering why this function is considered unsafe?
2024-07-17 16:22:28 +02:00
Matthias Krüger
0472b2a09f
Rollup merge of #127229 - notriddle:notriddle/mile-wide-bar, r=GuillaumeGomez
rustdoc: click target for sidebar items flush left

This change adjusts the clickable area of sidebar links to touch the leftmost edge of the canvas, making them [much easier](https://www.nngroup.com/articles/fitts-law/) to click (when the browser window is maximized or tiled left, but those cases are common enough to matter).

[Screencast from 2024-07-15 15-31-07.webm](https://github.com/user-attachments/assets/1e952d3a-e9e7-476b-b211-44a17c190b38)

<details><summary>old screencast</summary>

[Screencast from 2024-07-01 17-23-34.webm](https://github.com/rust-lang/rust/assets/1593513/dc6f9c2e-5904-403d-b353-d233e6e1afbc)

</details>
2024-07-17 16:22:26 +02:00
Matthias Krüger
2b34490da6
Rollup merge of #125042 - long-long-float:suggest-move-arg-outside, r=fmease
Use ordinal number in argument error

Add an ordinal number to two argument errors ("unexpected" and "missing") for ease of understanding error.

```
error[E0061]: this function takes 3 arguments but 2 arguments were supplied
  --> test.rs:11:5
   |
11 |     f(42, 'a');
   |     ^     --- 2nd argument of type `f32` is missing
   |
(snip)

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
  --> test.rs:12:5
   |
12 |     f(42, 42, 1.0, 'a');
   |     ^   ----
   |         | |
   |         | unexpected 2nd argument of type `{integer}`
   |         help: remove the extra argument
```

To get an ordinal number, I copied `ordinalize` from other crate `rustc_resolve` because I think it is too much to link `rustc_resolve` for this small function. Please let me know if there is a better way.
2024-07-17 16:22:26 +02:00
许杰友 Jieyou Xu (Joe)
d69cc1ccbf tests: update for rfs rename 2024-07-17 13:34:18 +00:00
许杰友 Jieyou Xu (Joe)
1f1bf4c71b run_make_support: use fs internally, but rfs to tests 2024-07-17 13:32:29 +00:00
许杰友 Jieyou Xu (Joe)
a00b860bfc tests: update rustdoc test for renamed assert_dirs_are_equal 2024-07-17 13:32:29 +00:00
许杰友 Jieyou Xu (Joe)
30bdc4a309 run_make_support: rename assert_recursive_eq to assert_dirs_are_equal 2024-07-17 13:32:29 +00:00
许杰友 Jieyou Xu (Joe)
57a2f76557 run_make_support: moved some helpers into string module 2024-07-17 13:32:29 +00:00
许杰友 Jieyou Xu (Joe)
0dfecb3855 run_make_support: move some helpers from assertion to path 2024-07-17 13:32:29 +00:00
许杰友 Jieyou Xu (Joe)
636be91cc0 tests: update for renamed fs module in run_make_support 2024-07-17 13:32:29 +00:00
许杰友 Jieyou Xu (Joe)
e1569fde3e run_make_support: coalesce fs helpers into single fs module
There were *two* `read_dir` helpers, one being a simple
`std::fs::read_dir` wrapper, the other has a different callback-based
signature. We also rename the callback-based `read_dir` as
`read_dir_entries`.

Also don't top-level re-export most `fs::*` helpers.
2024-07-17 13:32:28 +00:00
bors
08cdc2fa1a Auto merge of #127851 - tgross35:rollup-i39um74, r=tgross35
Rollup of 4 pull requests

Successful merges:

 - #127763 (Make more Windows functions `#![deny(unsafe_op_in_unsafe_fn)]`)
 - #127813 (Prevent double reference in generic futex)
 - #127847 (Reviewer on vacation)
 - #127850 (bootstrap: open `llvm-config` as r+w)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-07-17 13:20:54 +00:00
许杰友 Jieyou Xu (Joe)
13a1751061 run_make_support: rename cygpath_windows to get_windows_path and move under external_deps as private 2024-07-17 12:48:23 +00:00
许杰友 Jieyou Xu (Joe)
a443dc4ecd run_make_support: rename env_checked -> env 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
b7f7205212 run_make_support: move build_native_static_lib under external_deps
And fix some `ar`-related rebase mishaps.
2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
aadd08576d run_make_support: make set_host_rpath private and move into util 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
e956808c6c run_make_support: move handle_failed_output into util module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
88fd1df017 run_make_support: move assert_recursive_eq into assertion_helpers 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
56cbfa8749 tests: update rustdoc test for renamed assert_recursive_eq 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
230804dc3a run_make_support: rename recursive_diff to assert_recursive_eq 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
f66d3d33e4 run_make_support: move assertions and helpers into own module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
66cef19d11 run_make_support: move run_in_tmpdir and test_while_readonly to scoped_run module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
17212abd1a run_make_support: move fs helpers to own module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
dc9531533c run_make_support: move path-related helpers into own module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
483328d401 run_make_support: move artifact name helpers into artifact_names module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
439c6f60c7 run_make_support: move ar into own module 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
f042e72d1e run_make_support: cleanup and document some lib.rs reexports 2024-07-17 12:48:22 +00:00
许杰友 Jieyou Xu (Joe)
288c572745 run_make_support: move external deps to external_deps module 2024-07-17 12:48:21 +00:00
许杰友 Jieyou Xu (Joe)
a02008edac run_make_support: move env_var{,_os} into env_checked module 2024-07-17 12:48:21 +00:00