Commit Graph

229340 Commits

Author SHA1 Message Date
bors
4124617c6e Auto merge of #113606 - jyn514:parallel-compiler-cleanup, r=cjgillot
Don't require each rustc_interface tool to opt-in to parallel_compiler

Previously, forgetting to call `interface::set_thread_safe_mode` would cause the following ICE:
```
thread 'rustc' panicked at 'uninitialized dyn_thread_safe mode!', /rustc/dfe0683138de0959b6ab6a039b54d9347f6a6355/compiler/rustc_data_structures/src/sync.rs:74:18
```

This calls `set_thread_safe_mode` in `interface::run_compiler` to avoid requiring it in the caller.

Fixes `tests/run-make-fulldeps/issue-19371` when parallel-compiler is enabled.

r? `@SparrowLii` cc https://github.com/rust-lang/rust/issues/75760
2023-07-15 22:23:05 +00:00
bors
4c8bb79d9f Auto merge of #113697 - GuillaumeGomez:rm-unneeded-externallocation-handling, r=lqd
Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context

Should fix perf regression introduced in https://github.com/rust-lang/rust/pull/113623.

r? `@lqd`
2023-07-15 20:31:40 +00:00
bors
425726d46b Auto merge of #113732 - matthiaskrgr:rollup-nm5qy4i, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #113625 (Structurally normalize in selection)
 - #113644 (misc bootstrap cleanups)
 - #113663 (Implement "items do not inherit unsafety" note for THIR unsafeck)
 - #113683 (remove outdated `FIXME`s in bootstrap internals)
 - #113709 (rustdoc: use src consistently over source in CSS/JS)
 - #113724 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-15 18:13:26 +00:00
Matthias Krüger
5f94c876ad
Rollup merge of #113724 - GuillaumeGomez:migrate-gui-test-color-21, r=notriddle
Migrate GUI colors test to original CSS color format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

r? `@notriddle`
2023-07-15 19:42:53 +02:00
Matthias Krüger
331b5baddd
Rollup merge of #113709 - notriddle:notriddle/src, r=GuillaumeGomez
rustdoc: use src consistently over source in CSS/JS

The two terms have been used, inconsistently, in closely related spots like the `src/` directory vs `source-files.js`, and with things like `src-sidebar-toggle` vs the `source-sidebar`. This PR changes most use of `source` to `src` instead (except the localStorage configuration variables, which would be very complicated to migrate).

It also renames `.srclink` to `.src`. This is mostly aiming to cut out one of those many little peanut-butter bits of bloat, and is consistent with how other link classes are done (like how you have `a.mod` stylesheet rules, but there's also a `mod` class put on the body tag).
2023-07-15 19:42:53 +02:00
Matthias Krüger
d0ef799156
Rollup merge of #113683 - ozkanonur:polished, r=jyn514
remove outdated `FIXME`s in bootstrap internals

self-explanatory
2023-07-15 19:42:52 +02:00
Matthias Krüger
9b8be2f0e1
Rollup merge of #113663 - syvb:non_inherited_unsafe_thir, r=cjgillot
Implement "items do not inherit unsafety" note for THIR unsafeck

Implements the "items do not inherit unsafety from separate enclosing items" note from the MIR unsafety checker in the THIR unsafety checker (`-Z thir-unsafeck`) to maintain parity between the two unsafety checkers. The logic to find the separate enclosing item is nearly the same as in the MIR unsafety checker.
2023-07-15 19:42:52 +02:00
Matthias Krüger
e76ae3e4c5
Rollup merge of #113644 - jyn514:bootstrap-cleanups, r=albertlarsan68
misc bootstrap cleanups

- rename `detail_exit_macro` to `exit`
- remove unnecessary `Builder::new_standalone` function
- support `x suggest` with build-metrics
2023-07-15 19:42:51 +02:00
Matthias Krüger
da18cf8572
Rollup merge of #113625 - compiler-errors:structurally-norm-in-selection, r=lcnr
Structurally normalize in selection

We need to do this because of the fact that we're checking the `Ty::kind` on a type during selection, but goals passed into select are not necessarily normalized.

Right now, we're (kinda) unnecessarily normalizing the RHS of a trait upcasting goal, which is broken for different reasons (#113393). But I'm waiting for this PR to land before discussing that one.

r? `@lcnr`
2023-07-15 19:42:51 +02:00
syvb
2cfe8ed37d Implement "items do not inherit unsafety" for THIR unsafeck 2023-07-15 11:59:38 -04:00
bors
7a17f577b3 Auto merge of #112157 - erikdesjardins:align, r=nikic
Resurrect: rustc_target: Add alignment to indirectly-passed by-value types, correcting the alignment of byval on x86 in the process.

Same as #111551, which I [accidentally closed](https://github.com/rust-lang/rust/pull/111551#issuecomment-1571222612) :/

---

This resurrects PR #103830, which has sat idle for a while.

Beyond #103830, this also:
- fixes byval alignment for types containing vectors on Darwin (see `tests/codegen/align-byval-vector.rs`)
- fixes byval alignment for overaligned types on x86 Windows (see `tests/codegen/align-byval.rs`)
- fixes ABI for types with 128bit requested alignment on ARM64 Linux (see `tests/codegen/aarch64-struct-align-128.rs`)

r? `@nikic`

---

`@pcwalton's` original PR description is reproduced below:

Commit 88e4d2c from five years ago removed
support for alignment on indirectly-passed arguments because of problems with
the `i686-pc-windows-msvc` target. Unfortunately, the `memcpy` optimizations I
recently added to LLVM 16 depend on this to forward `memcpy`s. This commit
attempts to fix the problems with `byval` parameters on that target and now
correctly adds the `align` attribute.

The problem is summarized in [this comment] by `@eddyb.` Briefly, 32-bit x86 has
special alignment rules for `byval` parameters: for the most part, their
alignment is forced to 4. This is not well-documented anywhere but in the Clang
source. I looked at the logic in Clang `TargetInfo.cpp` and tried to replicate
it here. The relevant methods in that file are
`X86_32ABIInfo::getIndirectResult()` and
`X86_32ABIInfo::getTypeStackAlignInBytes()`. The `align` parameter attribute
for `byval` parameters in LLVM must match the platform ABI, or miscompilations
will occur. Note that this doesn't use the approach suggested by eddyb, because
I felt it was overkill to store the alignment in `on_stack` when special
handling is really only needed for 32-bit x86.

As a side effect, this should fix #80127, because it will make the `align`
parameter attribute for `byval` parameters match the platform ABI on LLVM
x86-64.

[this comment]: #80822 (comment)
2023-07-15 15:39:53 +00:00
bors
4d6e4260b2 Auto merge of #113514 - jyn514:more-gha-groups, r=oli-obk
Add even more GHA log groups

This also adds a dynamic check that we don't emit nested groups, since GHA currently doesn't support them.

r? `@oli-obk`
2023-07-15 13:52:04 +00:00
Guillaume Gomez
2778b71155 Migrate GUI colors test to original CSS color format 2023-07-15 15:14:06 +02:00
Michael Howell
d7d0a4533c rustdoc: rename to src-script.js
This is a separate commit to keep Git happy.
2023-07-14 16:54:14 -07:00
Michael Howell
e72fba4160 rustdoc: use src consistently over source in JavaScript
Since the directory that contains source files is called `src`,
it makes sense to name the scripts that way, too.
2023-07-14 16:54:14 -07:00
Michael Howell
34bc8fbea3 rustdoc: use src consistently over source in code
The CSS uses an inconsistent mix of both. This commit switches
it to always use `src`.
2023-07-14 16:38:01 -07:00
jyn
3a0caed188 fix another nesting issue 2023-07-14 17:34:27 -05:00
jyn
02ae14c972 fix another GHA log panic 2023-07-14 17:32:27 -05:00
jyn
ce843aa24c add a couple more groups
- group rustdoc-js-std
- group rust-installer/test.sh
2023-07-14 17:32:25 -05:00
jyn
3e306c2ddb Add track_caller to builder.msg
this makes the panics on nested GHA groups more useful
2023-07-14 17:32:05 -05:00
jyn
9851a141a3 put configure behind a group 2023-07-14 17:27:20 -05:00
jyn
dcd8d376cb don't print download progress in CI 2023-07-14 17:27:20 -05:00
jyn
26cdf7566c Add must_use to msg_ functions
This caught several places which weren't waiting until the command finished to drop the Group.

I also took the liberty of calling `msg_sysroot_tool` from `run_cargo_test` to reduce code duplication and make errors like this less likely in the future.
2023-07-14 17:27:20 -05:00
jyn
fff8223584 Add GHA log groups for tool tests 2023-07-14 17:27:20 -05:00
jyn
a5de56a95e Make sure toolstates.json ends in a newline
This avoids the following broken logging in CI:
```
{"book":"test-pass","reference":"test-pass","rustbook":"test-fail","rust-by-example":"test-pass","nomicon":"test-pass","embedded-book":"test-pass","edition-guide":"test-pass"}::group::Building bootstrap
```
2023-07-14 17:27:20 -05:00
jyn
df5cc59a68 fix nested GHA groups (redux) 2023-07-14 17:27:20 -05:00
jyn
fb3ac44dd8 Don't checkout the LLVM submodule in x dist --dry-run
We don't actually need it and it's quite slow.
2023-07-14 17:27:20 -05:00
jyn
2b3db1cd5a Don't nest GHA groups in check::Std 2023-07-14 17:27:20 -05:00
jyn
d3cdf27184 Add even more GHA log groups
This also adds a dynamic check that we don't emit nested groups, since GHA currently doesn't support them.
2023-07-14 17:27:20 -05:00
jyn
dc48a8b72c Fix x suggest --run
i broke this in the previous commit; and metrics never worked until i switched from `execute_cli` to build
2023-07-14 17:26:02 -05:00
Erik Desjardins
2daacf5af9 i686-windows: make requested alignment > 4 special case apply transitively 2023-07-14 17:48:13 -04:00
bors
ad963232d9 Auto merge of #113471 - compiler-errors:new-solver-norm-escaping, r=lcnr
Allow escaping bound vars during `normalize_erasing_regions` in new solver

Add `AllowEscapingBoundVars` to `deeply_normalize`, and use it in the new solver in the `query_normalize` routine.

Ideally, we'd make all `query_normalize` calls handle pass in `AllowEscapingBoundVars` individually, because really the only `query_normalize` call that needs `AllowEscapingBoundVars::Yes` is the one in `try_normalize_generic_arg_after_erasing_regions`, but I think that's kind of overkill. I am happy to be convinced otherwise, though.

r? `@lcnr`
2023-07-14 21:14:30 +00:00
Erik Desjardins
f297f3200f extern-fn-explicit-align test: remove unnecessary derives 2023-07-14 16:22:29 -04:00
bors
3b55d2385a Auto merge of #113703 - matthiaskrgr:rollup-19uhwuh, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #113599 (Use maybe_body_owned_by for multiple suggestions)
 - #113662 (Rename VecDeque's `rotate_left` and `rotate_right` parameters)
 - #113681 (rustdoc-json: Add test for private supertrait.)
 - #113682 (trait system refactor ping: also apply to nested modules of `solve`)
 - #113685 (Print artifact sizes in `opt-dist`)
 - #113688 (llvm-wrapper: update for LLVM API change)
 - #113692 (tests: adapt for removal of -opaque-pointers in LLVM 17)
 - #113698 (Make it clearer that we're just checking for an RPITIT)
 - #113699 (update Miri)

Failed merges:

 - #113625 (Structurally normalize in selection)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-14 19:26:19 +00:00
Michael Goulet
7fb27e4717 Structurally normalize in selection 2023-07-14 18:40:18 +00:00
ozkanonur
5e1ac1eb8b remove outdated FIXMEs on bootstrap
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-07-14 21:03:34 +03:00
Matthias Krüger
97c73b6ffc
Rollup merge of #113699 - RalfJung:miri, r=RalfJung
update Miri

This fixes a pretty nasty bug in the tag GC.

r? ghost
2023-07-14 19:33:30 +02:00
Matthias Krüger
0baf4406da
Rollup merge of #113698 - compiler-errors:rpitit-check, r=spastorino
Make it clearer that we're just checking for an RPITIT

Tiny nit to use `is_impl_trait_in_trait` more, to make it clearer that we're just checking whether a def-id is an RPITIT, rather than doing something meaningful with the `opt_rpitit_info`.

r? `@spastorino`
2023-07-14 19:33:29 +02:00
Matthias Krüger
9a6eac3001
Rollup merge of #113692 - krasimirgg:llvm-17-no-opaque, r=nikic
tests: adapt for removal of -opaque-pointers in LLVM 17

The commit 53717cabf8 removed the flag from LLVM.

Found via our experimental rust + LLVM@HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/20777#01895454-40b2-4e2f-978b-1294a83e1cce
2023-07-14 19:33:29 +02:00
Matthias Krüger
59d8da00e5
Rollup merge of #113688 - krasimirgg:llvm-17-small-string, r=nikic
llvm-wrapper: update for LLVM API change

No functional changes intended.

Adds an include for `llvm::SmallString`. Previously, this must have been implicitly provided by some of the existing headers. With recent LLVM changes, not anymore:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/20776#01895448-44a4-4a1e-8407-9d41d0186132/209-690
2023-07-14 19:33:28 +02:00
Matthias Krüger
dae9e40213
Rollup merge of #113685 - Kobzol:opt-dist-binary-sizes, r=Mark-Simulacrum
Print artifact sizes in `opt-dist`

The Python PGO script printed a nice table of artifact sizes (`librustc_driver.so`, `libLLVM.so`, ...) at the end of the CI run, which was useful to quickly see the sizes of important files. I forgot to port this functionality into the Rust (`opt-dist`) version in https://github.com/rust-lang/rust/pull/112235. This PR fixes that.

r? bootstrap
2023-07-14 19:33:28 +02:00
Matthias Krüger
b539eb8f47
Rollup merge of #113682 - lcnr:toml-file, r=Mark-Simulacrum
trait system refactor ping: also apply to nested modules of `solve`
2023-07-14 19:33:27 +02:00
Matthias Krüger
4bd62f7751
Rollup merge of #113681 - aDotInTheVoid:rdj-priv-supertrait, r=GuillaumeGomez
rustdoc-json: Add test for private supertrait.

Helps with https://github.com/rust-lang/rust/issues/81359

r? ``@GuillaumeGomez``
2023-07-14 19:33:27 +02:00
Matthias Krüger
a42b04c408
Rollup merge of #113662 - pedroclobo:vec-deque-rotate, r=thomcc
Rename VecDeque's `rotate_left` and `rotate_right` parameters

This pull request introduces a modification to the `VecDeque` collection, specifically the `rotate_left` and `rotate_right` functions, by renaming the parameter associated with these functions.

The rationale behind this change is to provide clearer and more consistent naming for the parameter that specifies the number of places to rotate the double-ended queue. By using `n` as the parameter name in both functions, it becomes easier to understand and remember the purpose of the parameter.
2023-07-14 19:33:26 +02:00
Matthias Krüger
f6dbf7d69b
Rollup merge of #113599 - chenyukang:yukang-fix-use-maybe_body_owned_by, r=cjgillot
Use maybe_body_owned_by for multiple suggestions

This is a continued work from https://github.com/rust-lang/rust/pull/113567

We have several other suggestions not working for closure, this PR use `maybe_body_owned_by` to fix them and add test cases for them.
2023-07-14 19:33:26 +02:00
bors
079e544174 Auto merge of #109025 - cjgillot:refprop-dbg, r=JakobDegen
Enable MIR reference propagation by default
2023-07-14 17:32:59 +00:00
bors
5767cad9b8 Auto merge of #113591 - mdibaiee:genericargs-cleanup, r=oli-obk
refactor(rustc_middle): Substs -> GenericArg

resolves #110793

- [x] rename `SubstsRef` and `InternalSubsts` to `GenericArgsRef<'tcx>` and `GenericArgs<'tcx>`.
- [x] rename variables and fields currently using `substs` to `args`.
- [x] update the module name of `ty::subst` to `ty::generic_args` or sth. Make that module private and publicly reexport its content in the ty module.
- [x] rename `EarlyBinder::subst(_identity)` to `EarlyBinder::instantiate(_identity)`.
- [x] types called `[a-zA-Z]+Substs` renamed to `XArgs`.
- [x] functions containing `substs` now use `args` or `generic_args` (mostly the former).

However, the verb of "substituting" is still being used here and there, mostly in comments. I think that can be a separate PR as part of https://github.com/rust-lang/rust/issues/110254 to change the verb to `replace_generics` or something similar.
2023-07-14 15:31:15 +00:00
Michael Goulet
14672eba8b Make it clearer that we're just checking for an RPITIT 2023-07-14 15:18:48 +00:00
Guillaume Gomez
1fa8b9aa56 Remove unneeded handling for ExternalLocation::Unknown in rustdoc render context 2023-07-14 17:04:29 +02:00
Michael Goulet
1ef85d82e0 assertion, comment 2023-07-14 15:03:21 +00:00