213144 Commits

Author SHA1 Message Date
Matthias Krüger
ae90226896
Rollup merge of #105976 - jyn514:unused-make-targets, r=Mark-Simulacrum
Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule

It's not used anywhere in CI, and it seems of questionable use. It was first added in 0e272de69f4a9c889e5f1a024a88b3e1f60cb6c5, which looks like it's just intended for CI, not as a user-facing feature.
2022-12-20 23:35:17 +01:00
Matthias Krüger
b68e994503
Rollup merge of #105973 - oli-obk:simplify_callee_checks, r=jackh726
Avoid going through the happy path in case of non-fn builtin calls

No functional change, just doing an early return. The removed comment is not applicable anymore, not every node needs type bindings in the error case. At best this would have been needed to avoid ICEs, but afaict this can't happen anymore today, as we do fallible checks.
2022-12-20 23:35:17 +01:00
Matthias Krüger
b9edcfa055
Rollup merge of #105972 - notriddle:notriddle/anchor, r=GuillaumeGomez
rustdoc: simplify section anchor CSS

Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be always positioned absolute, specifying it on hover as well is redundant.
2022-12-20 23:35:16 +01:00
Matthias Krüger
50cfffa7a2
Rollup merge of #105964 - notriddle:notriddle/scraped-example-length, r=GuillaumeGomez
rustdoc: prevent CSS layout of line numbers shrinking into nothing

Before:

![image](https://user-images.githubusercontent.com/1593513/208730117-039442b4-01ee-4eee-8001-26429f9d54c3.png)

After:

![image](https://user-images.githubusercontent.com/1593513/208730167-ab2f95a9-1eea-48f9-a9c9-3a69d9db484a.png)
2022-12-20 23:35:16 +01:00
Matthias Krüger
a039b2218c
Rollup merge of #105949 - ChrisDenton:bump-cfg-if, r=Nilstrieb
Bump `cfg-if` to `1.0` in rustc crates

When `packed_simd_2` and `getrandom` are updated to newer versions, we will no longer have a dependency on old `cfg_if` versions.
2022-12-20 23:35:16 +01:00
Matthias Krüger
2ddfa8fd3b
Rollup merge of #105904 - MarcusCalhoun-Lopez:darwin_arch_i386, r=bjorn3
Fix arch flag on i686-apple-darwin

i686-apple-darwin should use `-arch i386` instead of `-arch i686`
2022-12-20 23:35:15 +01:00
Matthias Krüger
a4ef47d6b3
Rollup merge of #105897 - oli-obk:tait_patterns, r=TaKO8Ki
Fix an opaque type ICE

fixes #104551

The issue is that if you have

```rust
type T = impl Sized;
let (_a, _b): T = ..
```

we have only the type annotation `T`, but want to use that ascription for `_a` and `_b`, so what we generate is a type ascription plus a field projection saying `_a`'s type is `T::0`. Of course `T` has no fields. Of course we could also not generate type annotations for projections into opaque types at all, but that's more fragile, as we now have to make sure that 12bbdbdb44/compiler/rustc_mir_build/src/build/matches/mod.rs (L709) doesn't have any arm that introduces a user type annotation except for `PatKind::Binding`.
2022-12-20 23:35:15 +01:00
Matthias Krüger
4726e514d7
Rollup merge of #105791 - Ezrashaw:add-e0472-long-docs, r=GuillaumeGomez
docs: add long error explanation for error E0472

Add long-form error docs for E0472: "inline assembly not supported on this target" and update UI tests.

R? `@GuillaumeGomez`
2022-12-20 23:35:14 +01:00
Joshua Nelson
fb89ae4092 Remove unused check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu
It's not used anywhere in CI, and it seems of questionable use.
It was first added in 0e272de69f4a9c889e5f1a024a88b3e1f60cb6c5, which looks like it's just intended for CI, not as a user-facing feature.
2022-12-20 15:42:38 -06:00
Michael Howell
b29a9e3b3f rustdoc: simplify section anchor CSS
Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be
always positioned absolute, specifying it on hover as well is redundant.
2022-12-20 12:44:22 -07:00
Oli Scherer
1c5b53be1c Avoid going through the happy path in case of non-fn builtin calls 2022-12-20 18:59:52 +00:00
Michael Howell
168e3da812 rustdoc: prevent CSS layout of line numbers shrinking into nothing 2022-12-20 10:32:35 -07:00
bors
d6da428f34 Auto merge of #105381 - uweigand:s390x-ffi-vaarg, r=nikic
Implement va_list and va_arg for s390x FFI

Following the s390x ELF ABI and based on the clang implementation, provide appropriate definitions of va_list in library/core/src/ffi/mod.rs and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs.

Fixes the following test cases on s390x:
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn src/test/ui/abi/variadic-ffi.rs

Fixes https://github.com/rust-lang/rust/issues/84628.
2022-12-20 17:09:11 +00:00
Oli Scherer
f1ef038ae4 use track_caller to show where the panic is actually from 2022-12-20 14:13:29 +00:00
bors
65bd2a6a73 Auto merge of #105951 - matthiaskrgr:rollup-aqxz888, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #105835 (Refactor post borrowck cleanup passes)
 - #105930 (Disable `NormalizeArrayLen`)
 - #105938 (Update coerce_unsized tracking issue from #27732 to #18598)
 - #105939 (Improve description of struct-fields GUI test)
 - #105943 (Add regression test for #102206)
 - #105944 (Add regression test for #80816)
 - #105945 (Add regression test for #57404)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-20 13:58:08 +00:00
Oli Scherer
c9588d5bf8 Hackily fix an opaque type ICE 2022-12-20 13:43:41 +00:00
Oli Scherer
e405dabf7d Some style nits 2022-12-20 13:43:11 +00:00
Oli Scherer
8b1530260c Replace a find with a loop to simplify the logic. 2022-12-20 13:42:41 +00:00
Oli Scherer
562d846ff0 Make it easier to debug where a region error was created 2022-12-20 13:42:07 +00:00
Oli Scherer
8b5a96ec45 Some tracing cleanups 2022-12-20 13:39:48 +00:00
Matthias Krüger
8db5dd4983
Rollup merge of #105945 - JohnTitor:issue-57404, r=compiler-errors
Add regression test for #57404

r? `@compiler-errors`
Closes https://github.com/rust-lang/rust/issues/57404

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20 14:37:35 +01:00
Matthias Krüger
b149315fda
Rollup merge of #105944 - JohnTitor:issue-80816, r=compiler-errors
Add regression test for #80816

Closes #80816
r? `@compiler-errors`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20 14:37:34 +01:00
Matthias Krüger
d6fbe79850
Rollup merge of #105943 - JohnTitor:issue-102206, r=compiler-errors
Add regression test for #102206

Closes #102206
r? `@compiler-errors`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20 14:37:34 +01:00
Matthias Krüger
191a877c88
Rollup merge of #105939 - GuillaumeGomez:improve-description-gui-test, r=Dylan-DPC
Improve description of struct-fields GUI test

I moved the comment at the top of the file and clarified it a little bit.

r? `@notriddle`
2022-12-20 14:37:33 +01:00
Matthias Krüger
ced6f38c99
Rollup merge of #105938 - andersk:coerce_unsized-tracking, r=Dylan-DPC
Update coerce_unsized tracking issue from #27732 to #18598

Issue #27732 was closed as a duplicate of #18598.
2022-12-20 14:37:33 +01:00
Matthias Krüger
c3af456d6d
Rollup merge of #105930 - JakobDegen:nal-unsound, r=oli-obk
Disable `NormalizeArrayLen`

cc #105929

r? mir-opt
2022-12-20 14:37:32 +01:00
Matthias Krüger
52fe5a1cc1
Rollup merge of #105835 - tmiasko:cleanup-post-borrowck, r=JakobDegen
Refactor post borrowck cleanup passes
2022-12-20 14:37:31 +01:00
Chris Denton
b859b8b62b
Bump cfg-if to 1.0 2022-12-20 13:03:45 +00:00
bors
8a746f4ac3 Auto merge of #105940 - matthiaskrgr:rollup-ho4po1t, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #105901 (Don't panic on stable since miri is not available there)
 - #105912 (rustdoc: force pre tags to have the default line height)
 - #105914 (rustdoc: Simplify CSS for scraped code examples code blocks)
 - #105933 (Add readable rustdoc display for tvOS and watchOS)
 - #105935 (docs/test: add UI test and long-form error docs for `E0377`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-20 10:20:27 +00:00
Yuki Okushi
8f88cecab6
Add regression test for #57404
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20 18:52:30 +09:00
Yuki Okushi
17d7d71d94
Add regression test for #80816
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20 18:48:02 +09:00
Yuki Okushi
a115a59cb2
Add regression test for #102206
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-20 18:24:04 +09:00
Ezra Shaw
082ca1e461
docs: add long error explanation for error E0472 2022-12-20 21:34:30 +13:00
Matthias Krüger
051c52a727
Rollup merge of #105935 - Ezrashaw:add-test+docs-for-e0377, r=GuillaumeGomez
docs/test: add UI test and long-form error docs for `E0377`
2022-12-20 08:51:16 +01:00
Matthias Krüger
9888ef77c5
Rollup merge of #105933 - taiki-e:doc-cfg, r=GuillaumeGomez
Add readable rustdoc display for tvOS and watchOS

They are currently displayed as `target_os="..."` in rustdoc, but it would be nice to have readable display like in iOS and other OSs.

<img width="487" alt="cfg" src="https://user-images.githubusercontent.com/43724913/208579395-fd5cf276-8171-47ab-bbed-23e40bb7af11.png">
2022-12-20 08:51:16 +01:00
Matthias Krüger
1abbc3f01b
Rollup merge of #105914 - GuillaumeGomez:simplify-css-examples-code-blocks, r=notriddle
rustdoc: Simplify CSS for scraped code examples code blocks

It's another approach than https://github.com/rust-lang/rust/pull/105894 for https://github.com/rust-lang/rust/pull/105823.

I simply removed the extra style added for the scraped code blocks which appears to be unneeded.

r? `@notriddle`
2022-12-20 08:51:16 +01:00
Matthias Krüger
951949c05e
Rollup merge of #105912 - notriddle:notriddle/pre-line-height, r=GuillaumeGomez
rustdoc: force pre tags to have the default line height

Fixes #105906
2022-12-20 08:51:15 +01:00
Matthias Krüger
bcb75e61ab
Rollup merge of #105901 - oli-obk:no_miri_on_stable, r=Mark-Simulacrum
Don't panic on stable since miri is not available there

fixes #105816
2022-12-20 08:51:14 +01:00
bors
eb9e5e711d Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obk
Improve syntax of `newtype_index`

This makes it more like proper Rust and also makes the implementation a lot simpler.

Mostly just turns weird flags in the body into proper attributes.

It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
2022-12-20 07:27:01 +00:00
Guillaume Gomez
babd174ace Improve description of struct-fields GUI test 2022-12-20 08:22:31 +01:00
Anders Kaseorg
8c73ce6611 Update coerce_unsized tracking issue from #27732 to #18598
Issue #27732 was closed as a duplicate of #18598.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-12-19 23:09:47 -08:00
Ezra Shaw
e798fdf7be
docs/test: add UI test and long-form error docs for E0377 2022-12-20 18:31:15 +13:00
bors
7f42e58eff Auto merge of #105575 - compiler-errors:impl-wf-lint, r=oli-obk
Add `IMPLIED_BOUNDS_ENTAILMENT` lint

Implements a lint (#105572) version of the hard-error introduced in #105483. Context is in that PR.

r? `@lcnr`
cc `@oli-obk` who had asked for this to be a lint first

Not sure if this needs to be an FCP, since it's a lint for now.
2022-12-20 03:52:43 +00:00
Taiki Endo
1b11ce26fa Add readable rustdoc display for tvOS and watchOS 2022-12-20 12:42:12 +09:00
Jakob Degen
4251289f27 Disable NormalizeArrayLen 2022-12-19 17:38:18 -08:00
bors
c43bc13562 Auto merge of #105918 - matthiaskrgr:rollup-mmazd62, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #105801 (Realistic `Path::as_mut_os_str` doctest)
 - #105860 (Add long error docs for `E0460` and `E0457`)
 - #105895 (Test that we don't add a new kind of breaking change with TAITs)
 - #105902 (docs: improve pin docs)
 - #105910 (Update books)
 - #105913 (rustdoc: remove width-limiter from source pages, stop overriding CSS)
 - #105915 (Revert "Replace usage of `ResumeTy` in async lowering with `Context`")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-20 01:06:52 +00:00
bors
696563efc5 Auto merge of #105905 - lqd:revert-103880, r=jackh726
Revert #103880 "Use non-ascribed type as field's type in mir"

This PR prepares a revert for #103880 to fix #105809, #105881, #105886 and others (like the duplicates of the first one), in case an actual fix can't get done today.

I've also added the MCVE from #105809. There is no MCVE for the #105881 and #105886 ICEs yet however, so there are no tests for them here, although we'll need one before relanding the original changes.

Were this PR to land, it would also reopen #96514 as it was fixed by the original PR.

Opening as draft to allow time for a possible fix.

r? `@jackh726`
2022-12-19 22:37:12 +00:00
Ulrich Weigand
eb22d70aed Implement va_list and va_arg for s390x FFI
Following the s390x ELF ABI and based on the clang implementation,
provide appropriate definitions of va_list in library/core/src/ffi/mod.rs
and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs.

Fixes the following test cases on s390x:
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn
src/test/ui/abi/variadic-ffi.rs

Fixes https://github.com/rust-lang/rust/issues/84628.
2022-12-19 21:07:57 +01:00
Matthias Krüger
575b2a2232
Rollup merge of #105915 - andrewpollack:revert-105250-async-rm-resumety, r=tmandry
Revert "Replace usage of `ResumeTy` in async lowering with `Context`"

Reverts rust-lang/rust#105250
Fixes: #105501

Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts).

This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved

cc. `@Swatinem`
2022-12-19 20:55:00 +01:00
Matthias Krüger
d90658d1a2
Rollup merge of #105913 - notriddle:notriddle/width-limiter, r=GuillaumeGomez
rustdoc: remove width-limiter from source pages, stop overriding CSS
2022-12-19 20:55:00 +01:00