Commit Graph

142515 Commits

Author SHA1 Message Date
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
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
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
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
Jakub Beránek
18305eae8e
Print artifact sizes in opt-dist 2023-07-14 16:07:24 +02:00
Ralf Jung
b88bcda35a remove compile-flags that are no longer needed 2023-07-14 15:40:22 +02:00
Mahdi Dibaiee
e55583c4b8 refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
Ralf Jung
40cef615c0 work around custom_mir span 2023-07-14 12:12:27 +02:00
Lukas Markeffsky
b1a5423ff8 bootstrap: update defaults for compiler and library aliases 2023-07-14 09:41:35 +00:00
Matthias Krüger
aa2002ea0a
Rollup merge of #113668 - kupiakos:patch-1, r=calebcartwright
Correct `the` -> `there` typo in items.md
2023-07-14 01:03:09 +02:00
Matthias Krüger
8d6d566093
Rollup merge of #113640 - jyn514:nodejs-defaults, r=GuillaumeGomez
Make `nodejs` control the default for RustdocJs tests instead of a hard-off switch

If someone says `x test rustdoc-js-std` explicitly on the command line, it's because they want to run the tests. Give an error instead of doing nothing and reporting success.

Before:
```
; x t rustdoc-js
No nodejs found, skipping "tests/rustdoc-js" tests
Build completed successfully in 0:00:00
```

After:
```
; x t rustdoc-js
thread 'main' panicked at 'need nodejs to run js-doc-test suite', test.rs:1566:13
Build completed unsuccessfully in 0:00:00
```

I recommend viewing the diff with whitespace changes disabled.

r? ````@GuillaumeGomez````
2023-07-14 01:03:08 +02:00
Matthias Krüger
361461150b
Rollup merge of #113623 - GuillaumeGomez:add-jump-to-doc, r=notriddle
Add jump to doc

I'm using the source code pages of the compiler quite a lot, but one thing missing is the possibility to jump back from the source code to the item documentation. Since I also got a few others complaining about it, I think it's fine to add it since this option is nightly only.

This PR adds a link to jump back to item's documentation on the item definition (so on `Bar` in `struct Bar {... }`, as described in the unofficial [RFC](https://github.com/GuillaumeGomez/rfcs/blob/rustdoc-jump-to-definition/text/000-rustdoc-jump-to-definition.md)).

r? ````@notriddle````
2023-07-13 22:33:24 +02:00
Alyssa Haroldsen
3ce5f6eb44
Correct the -> there typo in items.md 2023-07-13 12:00:46 -07:00
bors
a161ab00db Auto merge of #113637 - Mark-Simulacrum:bootstrap-bump, r=ozkanonur
Bump bootstrap to 1.72 beta
2023-07-13 18:15:14 +00:00
Matthias Krüger
7ea4387a93
Rollup merge of #113616 - edg-l:fix_bootstrap, r=albertlarsan68
Fix bootstrap.py uname error

The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words

The error I got:
```
❯ ./x check
Traceback (most recent call last):
  File "/data1/edgar/rust/x.py", line 50, in <module>
    bootstrap.main()
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1113, in main
    bootstrap(args)
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1070, in bootstrap
    build = RustBuild(config_toml, args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 505, in __init__
    self.build = args.build or self.build_triple()
                               ^^^^^^^^^^^^^^^^^^^
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 976, in build_triple
    return config or default_build_triple(self.verbose)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 259, in default_build_triple
    kernel, cputype, processor = uname.decode(default_encoding).split()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
```

This is because

```
❯ uname -smp
Linux x86_64 AMD Ryzen 7 5800X 8-Core Processor
```
Returns more than 3 space separated words.
2023-07-13 12:19:25 +02:00
Matthias Krüger
253a4ca43f
Rollup merge of #113613 - GuillaumeGomez:allow-dash-in-file-name, r=notriddle
Allow to have `-` in rustdoc-json test file name

I extracted this commit from https://github.com/rust-lang/rust/pull/113574.

When I added the test, it kept saying that the JSON file couldn't be found. After investigating for a while, I discovered that we were expecting files to always use `_`, which is quite bad. So I added support for `-` in file names.

r? ``@notriddle``
2023-07-13 12:19:24 +02:00
Matthias Krüger
fc72c0fe8f
Rollup merge of #113603 - workingjubilee:test-for-98016, r=oli-obk
Test simd-wide-sum for codegen error

This adds the necessary test infrastructure to "build-pass" codegen tests, for the purpose of doing that for a single revision of a codegen test. When mir-opts are tested, the output may vary from the usual, and maybe for positive reasons... but we don't necessarily want to output such bad LLVMIR that LLVM starts crashing on it.

Currently when enabling MIR opts at higher levels this LLVMIR is still emitted, but it was previously disabled for getting in mir-opt's way and as this new revision without `// [mir-opt3]build-pass` would make it more likely to, I would like to not see the testing for the actual results regress again just because it was bundled with an ICE check as well.

This fixes https://github.com/rust-lang/rust/issues/98016
2023-07-13 12:19:23 +02:00
Matthias Krüger
a6fed6a0ca
Rollup merge of #113598 - weihanglo:update-cargo, r=weihanglo
Update cargo

10 commits in 45782b6b8afd1da042d45c2daeec9c0744f72cc7..694a579566a9a1482b20aff8a68f0e4edd99bd28
2023-07-05 16:54:51 +0000 to 2023-07-11 22:28:29 +0000
- fix(embedded): Always generate valid package names (rust-lang/cargo#12349)
- fix(embedded): Error on unsupported commands (rust-lang/cargo#12350)
- chore(ci): Automatically test new packages by using `--workspace` (rust-lang/cargo#12342)
- contrib docs: Add some more detail about how publishing works (rust-lang/cargo#12344)
- docs: Put cargo-add change under nightly (rust-lang/cargo#12343)
- Minor: Use "number" instead of "digit" when explaining Cargo's use of semver (rust-lang/cargo#12340)
- Update criterion (rust-lang/cargo#12338)
- Add profile strip to config docs. (rust-lang/cargo#12337)
- update re: multiple versions that differ only in the metadata tag (rust-lang/cargo#12335)
- doc: state `PackageId`/`SourceId` string is opaque (rust-lang/cargo#12313)

r? ``@ghost``
2023-07-13 12:19:23 +02:00
Matthias Krüger
893a5d2b32
Rollup merge of #113353 - compiler-errors:select-better, r=lcnr
Implement selection for `Unsize` for better coercion behavior

In order for much of coercion to succeed, we need to be able to deal with partial ambiguity of `Unsize` traits during selection. However, I pessimistically implemented selection in the new trait solver to just bail out with ambiguity if it was a built-in impl:
9227ff28af/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs (L126)

This implements a proper "rematch" procedure for dealing with built-in `Unsize` goals, so that even if the goal is ambiguous, we are able to get nested obligations which are used in the coercion selection-like loop:
9227ff28af/compiler/rustc_hir_typeck/src/coercion.rs (L702)

Second commit just moves a `resolve_vars_if_possible` call to fix a bug where we weren't detecting a trait upcasting to occur.

r? ``@lcnr``
2023-07-13 12:19:22 +02:00
The Miri Conjob Bot
461baf24f6 Merge from rustc 2023-07-13 06:40:21 +00:00
The Miri Conjob Bot
477ef41309 Preparing for merge from rustc 2023-07-13 06:33:31 +00:00
jyn
9d071b3b0d Make nodejs control the default for RustdocJs tests instead of a hard-off switch
If someone says `x test rustdoc-js-std` explicitly on the command line, it's because they want to
run the tests. Give an error instead of doing nothing and reporting success.
2023-07-13 01:27:23 -05:00
Mark Rousskov
cc907f80b9 Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
Mark Rousskov
7559d96be9 Bump bootstrap compiler to latest 2023-07-12 21:26:04 -04:00
Ralf Jung
d1e1f76afe fix tag GC deleting protected tags 2023-07-12 22:28:33 +02:00
bors
33a2c2487a Auto merge of #113621 - ehuss:ignore-clippy-tests, r=Nilstrieb
Ignore flaky clippy tests.

These tests are frequently failing due to an issue in ui_test. ui_test doesn't appear to have a blanket ignore instruction that I could find, so I just approximated it with ignoring both 32 and 64 bit.

Fixes #113585
2023-07-12 15:47:32 +00:00
Guillaume Gomez
3fd36bc083 Add jump to doc 2023-07-12 16:45:36 +02:00
Eric Huss
fb5efd7008 Ignore flaky clippy tests. 2023-07-12 06:59:57 -07:00
bors
1e6db3486d Auto merge of #113214 - GuillaumeGomez:try-run-fix, r=ozkanonur,jyn514
Don't fail early if `try_run` returns an error

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

Follow-up of #112962.

r? `@jyn514`
2023-07-12 13:58:10 +00:00
Ralf Jung
58433bfb95 fmt 2023-07-12 14:21:39 +02:00
Ralf Jung
4481569b28 Merge from rustc 2023-07-12 14:15:25 +02:00
Ralf Jung
7624d33fcc Preparing for merge from rustc 2023-07-12 14:15:13 +02:00
bors
da1d099f91 Auto merge of #112945 - compiler-errors:tighten-span-of-adjustment-error, r=oli-obk
(re-)tighten sourceinfo span of adjustments in MIR

Diagnostics rely on the spans of MIR statements being (approximately) correct in order to give suggestions relative to that span (i.e. `shrink_to_hi` and `shrink_to_lo`).

I discovered that we're *intentionally* lowering THIR exprs with their parent expr's span if they come from adjustments that are due to a parent expression. While I understand why that may be desirable to demonstrate the relationship of an adjustment and the expression that requires it, it leads to

1. very verbose borrowck output
2. incorrect spans for suggestions

Some diagnostics get around that by giving suggestions relative to other spans we've collected during MIR lowering, such as the span of the method's identifier (e.g. `name` in `.name()`), but this doesn't work too well when things come from desugaring.

I assume it also has lead to numerous tweaks and complications to diagnostics code down the road, which this PR doesn't necessarily aim to fix but may open the gates to fixing later... The last three commits are simplifications due to the fact that we can assume that the move span actually points to what is being moved (and a test).

This regressed in #89110, which was debated somewhat in #90286. cc `@Aaron1011` who originally made this change.

r? diagnostics

Fixes #113547
Fixes #111016
2023-07-12 12:11:09 +00:00
bors
136dab6614 Auto merge of #113569 - RalfJung:miri, r=oli-obk
miri: protect Move() function arguments during the call

This gives `Move` operands a meaning specific to function calls:
- for the duration of the call, the place the operand comes from is protected, making all read and write accesses insta-UB.
- the contents of that place are reset to `Uninit`, so looking at them again after the function returns, we cannot observe their contents

Turns out we can replace the existing "retag return place" hack with the exact same sort of protection on the return place, which is nicely symmetric.

Fixes https://github.com/rust-lang/rust/issues/112564
Fixes https://github.com/rust-lang/miri/issues/2927

This starts with a Miri rustc-push, since we'd otherwise conflict with a PR that recently landed in Miri.
(The "miri tree borrows" commit is an unrelated cleanup I noticed while doing the PR. I can remove it if you prefer.)
r? `@oli-obk`
2023-07-12 10:19:42 +00:00
Weihang Lo
9f1c760349
Update cargo 2023-07-12 11:19:09 +01:00
Edgar Luque
d68eea61c3
Fix bootstrap.py uname error.
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
2023-07-12 11:52:53 +02:00
Guillaume Gomez
18457ea47d Allow to have - in the rustdoc-json test file name 2023-07-12 10:45:49 +02:00
Jubilee
dc78cedd66
Rollup merge of #113579 - ekusiadadus:master, r=albertlarsan68
Revert "fix: 🐛 etc/bash_complettion -> src/etc/... to avoid copy …

## why

- [x] revert my broken PR

https://github.com/rust-lang/rust/pull/110906

This reverts commit 08ce68b6a6.
2023-07-11 21:00:29 -07:00