Commit Graph

256875 Commits

Author SHA1 Message Date
Lzu Tao
f3c89f1751 add codegen test for issue-118392, 71096 2024-06-09 07:35:24 +00:00
Lzu Tao
36e1414b10 add codegen test for #120440 2024-06-09 07:35:23 +00:00
bors
13423befc4 Auto merge of #126087 - jieyouxu:rmake-docs, r=Kobzol
run-make: add some basic docs about the test suite's setup

r? `@Kobzol`
2024-06-09 03:18:49 +00:00
bors
a595f3218e Auto merge of #126150 - RalfJung:offset_of_slice, r=compiler-errors
offset_of: allow (unstably) taking the offset of slice tail fields

Fields of type `[T]` have a statically known offset, so there is no reason to forbid them in `offset_of!`. This PR adds the `offset_of_slice` feature to allow them.

I created a tracking issue: https://github.com/rust-lang/rust/issues/126151.
2024-06-09 00:50:30 +00:00
bors
6c4755dcb7 Auto merge of #126173 - nikic:pr-ci-codegen-tests, r=Kobzol
Don't disable codegen tests in PR CI

Fixes https://github.com/rust-lang/rust/issues/126170.

r? `@ghost`
2024-06-08 22:32:54 +00:00
bors
f21554f7f0 Auto merge of #126121 - Kobzol:runmake-cmd-wrapper, r=jieyouxu
Add a custom Command wrapper to `run-make-support`

This should make it easier to make sure that we check process exit codes, and it should also make checking of stdout/stderr less verbose and more explicit in run-make tests. I prefer the `run()/run_fail().assert(...)` style to something like `run_fail_assert_exit_code`, because the former is more composable.

Regarding https://github.com/rust-lang/rust/issues/125747, I'm not sure if we really need a custom trait, I think that we can get far enough with just `Deref` on the `Cc/Clang/Rustc/Rustdoc/...` structs. But now that these structs don't even need `command_output` anymore, I think that they are fine-ish as they are with the macro.

Related issues: https://github.com/rust-lang/rust/issues/125617, https://github.com/rust-lang/rust/issues/125747

Fixes: https://github.com/rust-lang/rust/issues/125617 (because `command_output` is no longer a public method)

r? `@jieyouxu`
2024-06-08 19:40:23 +00:00
Nikita Popov
9cd6c32445 Don't disable codegen tests in PR CI 2024-06-08 21:25:49 +02:00
许杰友 Jieyou Xu (Joe)
e7409d2130 run-make: add some basic docs about the test suite's setup 2024-06-08 18:16:49 +00:00
Jakub Beránek
0a190e8d2d
Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
Jakub Beránek
18ae9afa82
Introduce a custom Command wrapper in run-make-support 2024-06-08 19:34:02 +02:00
bors
565cadb514 Auto merge of #126167 - matthiaskrgr:rollup-r717w0s, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #126132 (config.example.toml: minor improves)
 - #126149 (Miri std tests: don't set BOOTSTRAP_SKIP_TARGET_SANITY unnecessarily)
 - #126157 (add missing Scalar::from_i128)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-08 17:34:01 +00:00
Matthias Krüger
7fd9b1ffd4
Rollup merge of #126157 - RalfJung:scalar-i128, r=compiler-errors
add missing Scalar::from_i128

We seem to have `from` methods for all primitive types except `i128`... let's complete the set of methods. (This came up in https://github.com/rust-lang/miri/pull/3622.)
2024-06-08 18:38:00 +02:00
Matthias Krüger
ea26e7b2fa
Rollup merge of #126149 - RalfJung:miri-std-tests, r=clubby789
Miri std tests: don't set BOOTSTRAP_SKIP_TARGET_SANITY unnecessarily

Also explain why we disable isolation, while we are at it.
2024-06-08 18:37:59 +02:00
Matthias Krüger
9395236d3d
Rollup merge of #126132 - tshepang:patch-1, r=Kobzol
config.example.toml: minor improves
2024-06-08 18:37:59 +02:00
Ralf Jung
eb584a23bf offset_of: allow (unstably) taking the offset of slice tail fields 2024-06-08 18:17:55 +02:00
bors
cfdb6175c2 Auto merge of #126097 - Kobzol:runmake-change-cwd, r=jieyouxu
Change how runmake v2 tests are executed

This PR makes execution of v2 runmake tests more sane, by executing each test in a temporary directory by default, rather than running it inside `tests/run-make`. This will have.. a lot of conflicts.

Fixes: https://github.com/rust-lang/rust/issues/126080
Closes https://github.com/rust-lang/rust/issues/125726, because it removes `tmp_dir`, lol.

r? `@jieyouxu`

try-job: x86_64-msvc
2024-06-08 15:25:05 +00:00
Jakub Beránek
b10a404199
Fix windows test 2024-06-08 15:40:43 +02:00
bors
e484b3efa5 Auto merge of #125966 - schvv31n:impl_os_string_pathbuf_leak, r=workingjubilee
Implement `os_string_pathbuf_leak`

implementation of #125965

ACP: https://github.com/rust-lang/libs-team/issues/389 [ Accepted ]
2024-06-08 13:17:06 +00:00
Ralf Jung
e26e42fabe add missing Scalar::from_i128 2024-06-08 14:48:32 +02:00
Jakub Beránek
5844b679f3
Remove unnecessary functions and the last mention of TMPDIR from run-make-support 2024-06-08 13:10:55 +02:00
bors
655600c5cb Auto merge of #126116 - Kobzol:ci-remove-setup-python, r=jdno
CI: remove `Setup Python` action

This action was added recently in https://github.com/rust-lang/rust/pull/125590, but it shouldn't really be needed, as our CI was working fine before without it. Our base Ubuntu 20.04 images use Python 3.8, while this action installed Python 3.12, but we don't really need that.

Since this action does not support ARM yet, this blocks https://github.com/rust-lang/rust/pull/126113. See https://github.com/rust-lang/rust/pull/125590#issuecomment-2154438250.

r? `@jdno`
2024-06-08 09:30:45 +00:00
Ralf Jung
d5671d06a4 Miri std tests: don't set BOOTSTRAP_SKIP_TARGET_SANITY unnecessarily 2024-06-08 10:36:51 +02:00
bors
d8fde50745 Auto merge of #126111 - Zalathar:fulldeps-hotplug, r=jieyouxu
Port `tests/run-make-fulldeps/hotplug_codegen_backend` to ui-fulldeps

This is the last remaining run-make-fulldeps test, which means I actually had to leave behind a dummy README file to prevent compiletest from complaining about a missing directory.

(Removing the run-make-fulldeps suite entirely is non-trivial, so I intend to do so in a separate PR after this one.)

---

I wasn't sure about adding a new kind of aux build just for this one test, so I also tried to just port this test from Makefile to [rmake](https://github.com/rust-lang/rust/issues/121876) instead.

But I found that I couldn't get rmake to fully work for a run-make-fulldeps test, which convinced me that getting rid of run-make-fulldeps is worthwhile.

r? `@jieyouxu`
2024-06-08 07:23:17 +00:00
bors
16e8803579 Auto merge of #126143 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in 34a6a87d8a2330d8c9d578f927489689328a652d..b1feb75d062444e2cee8b3d2aaa95309d65e9ccd
2024-06-04 15:31:01 +0000 to 2024-06-07 20:16:17 +0000
- Keep lints updated (rust-lang/cargo#14030)
- test(lints): Ensure unused optional dep fires for shadowed dep (rust-lang/cargo#14028)
- Add `cargo update --breaking` (rust-lang/cargo#13979)
- Add tooling to document lints (rust-lang/cargo#14025)
- Rename --out-dir to --artifact-dir (rust-lang/cargo#13809)
- fix(lints): Add unknown_lints to lints list (rust-lang/cargo#14024)
- docs(contrib): Suggest atomic commits with separate test commits (rust-lang/cargo#14014)
- test(semver): track the behavior of `--precise <prerelease>` (rust-lang/cargo#14013)

r? ghost
2024-06-08 04:39:35 +00:00
bors
ff014f5de0 Auto merge of #126144 - fmease:rollup-i9pcdys, r=fmease
Rollup of 6 pull requests

Successful merges:

 - #125951 (Stabilize `error_in_core`)
 - #125998 (std::unix::fs::get_mode implementation for illumos/solaris.)
 - #126057 (Make html rendered by rustdoc allow searching non-English identifier / alias)
 - #126065 (mark binding undetermined if target name exist and not obtained)
 - #126105 (Add debugging utils and comments to Fuchsia scripts)
 - #126138 (Fix typo in docs for std::pin)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-08 02:29:28 +00:00
León Orell Valerian Liehr
733a6f1a1c
Rollup merge of #126138 - wbk:patch-1, r=lqd
Fix typo in docs for std::pin
2024-06-08 04:25:46 +02:00
León Orell Valerian Liehr
8e225fbac8
Rollup merge of #126105 - tmandry:fuchsia-scripts, r=lqd
Add debugging utils and comments to Fuchsia scripts

This should help when debugging a failure in the Fuchsia build in CI.

I plan to follow up with a PR to the testing section of the dev guide with more details, along with more improvements happening in the Fuchsia repo itself.

try-job: x86_64-gnu-integration
2024-06-08 04:25:46 +02:00
León Orell Valerian Liehr
4bca296f73
Rollup merge of #126065 - bvanjoi:fix-124490, r=petrochenkov
mark binding undetermined if target name exist and not obtained

- Fixes #124490
- Fixes #125013

Following up on #124840, I think handling only `target_bindings` is sufficient.

r? `@petrochenkov`
2024-06-08 04:25:45 +02:00
León Orell Valerian Liehr
1f715eb641
Rollup merge of #126057 - Sunshine40:rustdoc-search-non-english, r=notriddle
Make html rendered by rustdoc allow searching non-English identifier / alias

Fix alias search result showing `undefined` description.

Inspired by https://github.com/rust-lang/mdBook/issues/2393 .

Not sure if it's worth it adding full-text search functionality to rustdoc rendered html.
2024-06-08 04:25:45 +02:00
León Orell Valerian Liehr
ba31a0a920
Rollup merge of #125998 - devnexen:get_mode_illumos, r=Nilstrieb
std::unix::fs::get_mode implementation for illumos/solaris.

they both support the F_GETFL fctnl flag/O_ACCMODE mask to get the file descriptor access modes.
2024-06-08 04:25:44 +02:00
León Orell Valerian Liehr
cbda797b77
Rollup merge of #125951 - slanterns:error_in_core_stabilization, r=Amanieu
Stabilize `error_in_core`

Closes: https://github.com/rust-lang/rust/issues/103765.

`@rustbot` label: +T-libs-api

r? libs-api
2024-06-08 04:25:44 +02:00
Weihang Lo
ea748abb5b
Update cargo 2024-06-07 22:23:01 -04:00
bors
8fb1930c20 Auto merge of #126114 - ferrocene:pa-branch-1.81.0, r=pietroalbini
Set version number to 1.81.0

r? `@ghost`
2024-06-08 00:21:23 +00:00
bors
804421dff5 Auto merge of #126134 - matthiaskrgr:rollup-vzlegsc, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #124012 (Stabilize `binary_heap_as_slice`)
 - #124214 (Parse unsafe attributes)
 - #125572 (Detect pub structs never constructed and unused associated constants)
 - #125781 (prefer `compile::stream_cargo` for building tools)
 - #126030 (Update `./x fmt` command in library/std/src/sys/pal/windows/c/README.md)
 - #126047 (Simplify the rayon calls in the installer)
 - #126052 (More `rustc_parse` cleanups)
 - #126077 (Revert "Use the HIR instead of mir_keys for determining whether something will have a MIR body.")
 - #126089 (Stabilize Option::take_if)
 - #126112 (Clean up source root in run-make tests)
 - #126119 (Improve docs for using custom paths with `--emit`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-07 20:12:49 +00:00
Tyler Mandry
63ba3f3aaf Add debugging utils and comments to Fuchsia scripts
This should help when debugging a failure in the Fuchsia build in CI.
2024-06-07 12:47:49 -07:00
Walter Kalata
f82f0530f3
Fix typo in docs for std::pin 2024-06-07 12:18:43 -07:00
Matthias Krüger
df35d7a117
Rollup merge of #126119 - Zalathar:emit-filename, r=ehuss
Improve docs for using custom paths with `--emit`

Recently I found myself concluding that this feature didn't exist (https://github.com/rust-lang/rust/pull/126111#discussion_r1630707215), despite having read the documentation, because it was hidden away in the middle of a paragraph full of other information.

Giving this documentation more space of its own should make it easier to find.
2024-06-07 20:14:32 +02:00
Matthias Krüger
b8e28d1426
Rollup merge of #126112 - Kobzol:runmake-source-root, r=jieyouxu
Clean up source root in run-make tests

The name `S` isn't exactly the most descriptive, and we also shouldn't need to pass it when building (actually I think that most of the env. vars that we pass to `cargo` here are probably not really needed).

Related issue: https://github.com/rust-lang/rust/issues/126071

r? ```@jieyouxu```
2024-06-07 20:14:32 +02:00
Matthias Krüger
ccbd6c29b4
Rollup merge of #126089 - wutchzone:option_take_if, r=scottmcm
Stabilize Option::take_if

Closes #98934

ed: FCP complete in https://github.com/rust-lang/rust/issues/98934#issuecomment-2104627082
2024-06-07 20:14:31 +02:00
Matthias Krüger
2e82d7f569
Rollup merge of #126077 - oli-obk:revert_is_mir_available, r=BoxyUwU
Revert "Use the HIR instead of mir_keys for determining whether something will have a MIR body."

This reverts commit e5cba17b84.

turns out SMIR still needs it (https://github.com/model-checking/kani/issues/3218). I'll create a full plan and MCP for what I intended this to be a part of. Maybe my plan is nonsense anyway.
2024-06-07 20:14:31 +02:00
Matthias Krüger
4aceaaa7f3
Rollup merge of #126052 - nnethercote:rustc_parse-more-cleanups, r=spastorino
More `rustc_parse` cleanups

Following on from #125815.

r? `@spastorino`
2024-06-07 20:14:30 +02:00
Matthias Krüger
bc793291b5
Rollup merge of #126047 - cuviper:installer-try_for_each, r=albertlarsan68
Simplify the rayon calls in the installer

Rayon's `try_for_each` makes the `CombinedEncoder` a lot simpler.
2024-06-07 20:14:30 +02:00
Matthias Krüger
3689adf5a4
Rollup merge of #126030 - ChrisDenton:update-wingen-readme, r=Mark-Simulacrum
Update `./x fmt` command in library/std/src/sys/pal/windows/c/README.md

`./x fmt` no longer accepts paths so the command in the readme won't work.
2024-06-07 20:14:29 +02:00
Matthias Krüger
65fcba61e4
Rollup merge of #125781 - onur-ozkan:improve-tool-builder, r=albertlarsan68
prefer `compile::stream_cargo` for building tools

Previously, we were running bare commands for `ToolBuild` step and were unable to utilize some of the flags which  are already handled by `compile::stream_cargo`.

This change makes `ToolBuild` to use `compile::stream_cargo`, allowing us to benefit from the flags supported by the bootstrap cargo.

Resolves #125666
2024-06-07 20:14:29 +02:00
Matthias Krüger
13314df21b
Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix
Detect pub structs never constructed and unused associated constants

<!--
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>
-->

Lints never constructed public structs.

If we don't provide public methods to construct public structs with private fields, and don't construct them in the local crate. They would be never constructed. So that we can detect such public structs.

---
Update:

Also lints unused associated constants in traits.
2024-06-07 20:14:28 +02:00
Matthias Krüger
6e534c73c3
Rollup merge of #124214 - carbotaniuman:parse_unsafe_attrs, r=michaelwoerister
Parse unsafe attributes

Initial parse implementation for #123757

This is the initial work to parse unsafe attributes, which is represented as an extra `unsafety` field in `MetaItem` and `AttrItem`. There's two areas in the code where it appears that parsing is done manually and not using the parser stuff, and I'm not sure how I'm supposed to thread the change there.
2024-06-07 20:14:28 +02:00
Matthias Krüger
0acb5b8513
Rollup merge of #124012 - slanterns:as_slice_stabilize, r=BurntSushi
Stabilize `binary_heap_as_slice`

This PR stabilizes `binary_heap_as_slice`:

```rust
// std::collections::BinaryHeap

impl BinaryHeap<T> {
    pub fn as_slice(&self) -> &[T]
}
```

<br>

Tracking issue: https://github.com/rust-lang/rust/issues/83659.
Implementation PR: https://github.com/rust-lang/rust/pull/82331.

FCPs already completed in the tracking issue.

Closes https://github.com/rust-lang/rust/issues/83659.

r? libs-api
2024-06-07 20:14:27 +02:00
bors
4dc24ae394 Auto merge of #125798 - camelid:refactor-doctest, r=GuillaumeGomez
rustdoc: Refactor doctest collection and running code

This code previously had a quite confusing structure, mixing the collection,
processing, and running of doctests with multiple layers of indirection. There
are also many cases where tons of parameters are passed to functions with little
typing information (e.g., booleans or strings are often used).

As a result, the source of bugs is obfuscated (e.g. #81070) and large changes
(e.g.  #123974) become unnecessarily complicated. This PR is a first step to try
to simplify the code and make it easier to follow and less bug-prone.

r? `@GuillaumeGomez`
2024-06-07 18:02:40 +00:00
Tshepang Mbambo
9aa96b4623
config.example.toml: minor improves 2024-06-07 19:41:37 +02:00
Guillaume Gomez
6aab04e9b7 run fmt 2024-06-07 18:10:31 +02:00