Commit Graph

213362 Commits

Author SHA1 Message Date
Ralf Jung
4fa51925fa print sysroot build failure error 2022-12-28 17:18:14 +01:00
bors
fba3d79df0 Auto merge of #2743 - RalfJung:path-join, r=RalfJung
simplify path joining code a bit
2022-12-28 11:45:18 +00:00
Ralf Jung
041ad1fcfe simplify path joining code a bit 2022-12-28 12:44:41 +01:00
bors
fbdf926e70 Auto merge of #2742 - RalfJung:targets, r=RalfJung
handle unknown targets more gracefully

In particular don't require a list of all OSes in the TLS machinery. Instead just fall back to doing nothing.
2022-12-28 09:51:40 +00:00
Ralf Jung
7bdb5da916 handle unknown targets more gracefully 2022-12-28 10:51:13 +01:00
bors
ca1e861ee9 Auto merge of #2741 - RalfJung:filenames, r=RalfJung
cargo-miri: use rustc to determine the output filename

This should fix https://github.com/rust-lang/miri/issues/2740 and fix https://github.com/rust-lang/miri/issues/1867: we no longer need to hard-code the file name logic in cargo-miri.
2022-12-27 19:49:21 +00:00
Ralf Jung
d31029226b cargo-miri: use rustc to determine the output filename 2022-12-27 20:34:45 +01:00
bors
d8b48d450d Auto merge of #2739 - RalfJung:misc, r=RalfJung
enable some warnings that rustc bootstrap enables

also use cargo-install to install josh-proxy, since the docker version cannot access SSH keys (needed for pushing)
2022-12-25 13:21:26 +00:00
Ralf Jung
92b6562a25 enable some warnings that rustc bootstrap enables 2022-12-25 14:18:41 +01:00
Ralf Jung
fed7e2c935 use cargo-install to install josh-proxy 2022-12-25 14:16:10 +01:00
bors
d23554fae8 Auto merge of #2738 - RalfJung:rustup, r=RalfJung
Rustup
2022-12-24 09:41:11 +00:00
Ralf Jung
e52e0d8557 fix warnings 2022-12-24 10:40:50 +01:00
Ralf Jung
9c01e9f7f5 Merge from rustc 2022-12-24 10:12:14 +01:00
Ralf Jung
0c14ad4d9f Preparing for merge from rustc 2022-12-24 09:58:29 +01:00
bors
245357f619 Auto merge of #2646 - saethlin:data-race-spans, r=RalfJung
Data race spans

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

This adds output to data race errors very similar to the spans we emit for Stacked Borrows errors. For example, from our test suite:
```
help: The Atomic Load on thread `<unnamed>` is here
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:23:13
   |
23 | ...   (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write o...
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: The Write on thread `<unnamed>` is here
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:19:13
   |
19 |             *(c.0 as *mut usize) = 32;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^```
```

Because of https://github.com/rust-lang/miri/pull/2647 this comes without a perf regression, according to our benchmarks.
2022-12-24 08:13:31 +00:00
bors
4f4d0586ad Auto merge of #105893 - Ayush1325:remote-test-server-improve, r=Mark-Simulacrum
Use u32 methods instead of manual shifting

Switch to `to_le_bytes()` and `from_le_bytes()` instead of manual shifting

This was suggested [`here`](https://github.com/rust-lang/rust/pull/105145#discussion_r1051418964)

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-12-24 04:54:39 +00:00
bors
6c0c6d6eb3 Auto merge of #106103 - matthiaskrgr:rollup-8xe9ddz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #105970 (docs/test: add UI test and long-form error docs for E0462)
 - #105975 (rustc: Remove needless lifetimes)
 - #106069 (rustdoc: use a more evocative name for CSS/JS `#titles`)
 - #106084 (fix vec::IntoIter::drop on high-alignment ZST)
 - #106091 (Use correct CSS pseudo-element selector)
 - #106093 (rustdoc: remove no-op CSS from `.docblock-short`)
 - #106102 (Fix `triagebot.toml`)

Failed merges:

 - #106028 (docs/test: add UI test and long-form error docs for `E0461`)

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-24 01:42:00 +00:00
Matthias Krüger
da4be75b53
Rollup merge of #106102 - compiler-errors:oops-triagebot-broke, r=scottmcm
Fix `triagebot.toml`
2022-12-24 00:31:43 +01:00
Matthias Krüger
2ace0c6402
Rollup merge of #106093 - notriddle:notriddle/docblock-short-overflow, r=GuillaumeGomez
rustdoc: remove no-op CSS from `.docblock-short`

The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead.

These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
2022-12-24 00:31:43 +01:00
Matthias Krüger
cc0dc028fc
Rollup merge of #106091 - GuillaumeGomez:correct-css-pseudo-element, r=notriddle
Use correct CSS pseudo-element selector

Pseudo-element should use "::" to not be confused with pseudo selectors (nice explanation here: https://css-tricks.com/to-double-colon-or-not-do-double-colon/).

r? ``@notriddle``
2022-12-24 00:31:43 +01:00
Matthias Krüger
61fadf805f
Rollup merge of #106084 - RalfJung:into-iter, r=thomcc
fix vec::IntoIter::drop on high-alignment ZST

This fixes a soundness bug: IntoIter would call `drop_in_place` on an insufficiently aligned pointer. So if a ZST with alignment greater 1 had drop glue, that would be called with an unaligned reference. Since https://github.com/rust-lang/rust/pull/103957, Miri checks alignment even if the type does not have drop glue, which is how this bug was found.

r? ``@thomcc``
2022-12-24 00:31:42 +01:00
Matthias Krüger
ae6107070d
Rollup merge of #106069 - notriddle:notriddle/search-tabs, r=GuillaumeGomez
rustdoc: use a more evocative name for CSS/JS `#titles`

This renames the ID, which is only used in search results, to `#search-tabs`. Also changes the `.count` to a span, so it doesn't need its display mode to be overridden.
2022-12-24 00:31:41 +01:00
Matthias Krüger
d23cb738d2
Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
rustc: Remove needless lifetimes
2022-12-24 00:31:41 +01:00
Matthias Krüger
e08dd9d998
Rollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomez
docs/test: add UI test and long-form error docs for E0462

Another UI test/ docs combo.

r? ``@GuillaumeGomez``
2022-12-24 00:31:40 +01:00
Michael Goulet
e97e55f87b Fix triagebot.toml 2022-12-23 23:28:02 +00:00
bors
2c3f284003 Auto merge of #106088 - weihanglo:update-cargo, r=weihanglo
Update cargo

7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000

- fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478)
- Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503)
- Don't scrape examples from library targets by default (rust-lang/cargo#11499)
- Stabilize terminal-width (rust-lang/cargo#11494)
- Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501)
- Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477)
- Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)

r? `@ghost`
2022-12-23 23:01:08 +00:00
bors
af3e06f1bf Auto merge of #106087 - Nilstrieb:rollup-2m3nies, r=Nilstrieb
Rollup of 6 pull requests

Successful merges:

 - #105661 (implement the skeleton of the updated trait solver)
 - #105853 (Make the pre-push script work on directories with spaces)
 - #106043 (Move tests)
 - #106048 (Run `tidy` in its own job in PR CI)
 - #106055 (Check arg expressions properly on error in `confirm_builtin_call`)
 - #106067 (A few metadata nits)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-23 19:46:36 +00:00
Michael Howell
1c05d4b02a rustdoc: remove no-op CSS from .docblock-short
The rules `overflow:hidden` and `text-overflow:ellipses` only have an
effect if overflow occurs, which cannot happen because it will just line
wrap instead.

These rules definitely became obsolete by
https://github.com/rust-lang/rust/pull/77699, when the stylesheet was
decidedly changed to have line wrapping in short docblocks, but given the
bug it was fixing, this probably got broken earlier.
2022-12-23 12:02:23 -07:00
Ben Kimock
81fe37a900 Mention and number the components of a race in the order the interpreter sees them 2022-12-23 13:45:43 -05:00
Guillaume Gomez
ddd9591a85 Use correct CSS pseudo-element selector 2022-12-23 19:30:44 +01:00
Weihang Lo
5d3c22dae5
Update cargo
7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44
2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000

- fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478)
- Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503)
- Don't scrape examples from library targets by default (rust-lang/cargo#11499)
- Stabilize terminal-width (rust-lang/cargo#11494)
- Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501)
- Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477)
- Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)
2022-12-23 17:05:41 +00:00
nils
659c218b3a
Rollup merge of #106067 - Nilstrieb:meta-cleanup, r=petrochenkov
A few metadata nits

Found while reading through the code. The `NOTE` is outdated now after #97376.
2022-12-23 18:02:16 +01:00
nils
de99a87926
Rollup merge of #106055 - compiler-errors:too-many-calls, r=estebank
Check arg expressions properly on error in `confirm_builtin_call`

Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: https://github.com/rust-lang/rust/pull/105973#issuecomment-1363152232

Fixes #106030
Fixes #105244
2022-12-23 18:02:15 +01:00
nils
9192874b29
Rollup merge of #106048 - fee1-dead-contrib:tidy-ci-continuation, r=jyn514
Run `tidy` in its own job in PR CI

This duplicates mingw-check into two jobs where one job runs `tidy` only while the other job does not. The tidy job will not cancel other jobs on failure.
2022-12-23 18:02:15 +01:00
nils
a8000516a6
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
Move tests

r? ``@petrochenkov``

* 6470 is an ancient LLVM compilation bug
* 22375 to typeck because of https://github.com/rust-lang/rust/pull/23013
2022-12-23 18:02:14 +01:00
nils
85d39ba646
Rollup merge of #105853 - jyn514:prepush-windows, r=Mark-Simulacrum
Make the pre-push script work on directories with spaces

As a secondary benefit, it's also a lot simpler.

cc `@caass` - would love to have a review if you have time :)
2022-12-23 18:02:13 +01:00
nils
fd5af8cc23
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
implement the skeleton of the updated trait solver

cc ```@rust-lang/initiative-trait-system-refactor```

This is mostly following the architecture discussed in the types team meetup.

After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.

This somewhat closely mirrors the current `evaluate` implementation with the following notable differences:
- it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)
- it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful)
- it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality)
- it is implemented to work with lazy normalization

A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.

r? ```@compiler-errors``` / ```@rust-lang/types``` :3
2022-12-23 18:02:13 +01:00
bors
c2ff8ad035 Auto merge of #105550 - gimbles:master, r=Nilstrieb
Use `DepKind` instead of `&'static str` in `QueryStackFrame`

`@rustbot` author

Fixes #105168
2022-12-23 16:57:21 +00:00
Jeremy Stucki
1174aacf59
Indicate anonymous lifetime 2022-12-23 15:59:53 +01:00
Ralf Jung
a48d2e1783 fix one more unaligned self.ptr, and add tests 2022-12-23 15:49:23 +01:00
Ralf Jung
19422fcbfe attempt to clarify what the backtrace belongs to when there could be ambiguity 2022-12-23 15:39:14 +01:00
Ralf Jung
d0f404d77a fix IntoIter::drop on high-alignment ZST 2022-12-23 15:18:18 +01:00
bors
62cc869245 Auto merge of #106053 - compiler-errors:incr-test-revision, r=Mark-Simulacrum
Take revision into account in non-incremental-mode `// incremental` tests

A UI test I added in #105983 confusingly [failed](https://github.com/rust-lang/rust/pull/106031#issuecomment-1362558067) in a merge because two different revisions raced with each other for the same incremental directory for a (non-incremental-mode, i.e. `src/test/ui`) UI test.

Let's take the revision name into account when generating an incremental directory so that other UI tests that combine `// incremental` and `// revisions` won't race and cause possible flakiness in CI.
2022-12-23 13:37:11 +00:00
gimbles
f8b30084ac Use DepKind instead of &str 2022-12-23 18:39:49 +05:30
Caio
d4344d2f91 Move tests 2022-12-23 08:05:12 -03:00
bors
14e2fe4039 Auto merge of #106033 - ChrisDenton:bump-cfg-if, r=Mark-Simulacrum
Remove old version of `cfg-if` by bumping `packed_simd_2` and `getrandom v0.2` versions

```console
> cargo update --package packed_simd_2 --package getrandom@0.2.0
    Updating crates.io index
    Removing cfg-if v0.1.10
    Updating getrandom v0.2.0 -> v0.2.8
    Updating packed_simd_2 v0.3.4 -> v0.3.8
```

`packed_simd_2` is only used as a dependency of `bytecount` which in turn is only used by `rustfmt`. I can't see any issue with the minor version bump.

The bigger jump is `getrandom@0.2.0` which is used by a number of things, but 0.2.8 is still semver compatible and there doesn't seem to be any worrying changes (see the [changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)). The only breaking change are the removal of XP, stdweb and CloudAbi support but these are not host targets and rustc lacks support for them in any case (stdweb development was [abandonded](https://rustsec.org/advisories/RUSTSEC-2020-0056.html), XP is [tier 3 and `no_std`](https://doc.rust-lang.org/beta/rustc/platform-support.html#tier-3) and CloubAbi is [no longer supported](https://github.com/rust-lang/rust/pull/78439)).

Note that this doesn't affect `getrandom@0.1.16` which is what std depends on and which is already using the latest version of `cfg-if` (besides, there are already plans to remove that entirely).
2022-12-23 10:46:58 +00:00
Ayush Singh
51fe24873f
Use u32 methods instead of manual shifting
Switch to `to_be_bytes()` and `from_be_bytes()` instead of manual
shifting

This was suggested [`here`](https://github.com/rust-lang/rust/pull/105145#discussion_r1051418964)

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-12-23 16:08:23 +05:30
Michael Goulet
69abe4458e Add tests 2022-12-23 04:12:30 +00:00
Michael Goulet
81cde69a2f Eagerly evaluate args 2022-12-23 04:12:30 +00:00
bors
5e656baf8b Auto merge of #106070 - matthiaskrgr:rollup-jv9ctkl, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #105978 (Mark `proc_macro_decls_static` as always used)
 - #106051 (Allow building std with cranelift)
 - #106056 (Make `sess.bug` much less noisy)
 - #106057 (Give a more helpful error for "trimmed_def_paths constructed")
 - #106058 (Fix the issue number in comment for as_local_call_operand)
 - #106059 (Avoid running the `Profile` step twice on `x setup`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-23 02:44:32 +00:00