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 0e272de69f
, which looks like it's just intended for CI, not as a user-facing feature.
2022-12-20 15:42:38 -06:00
Jeremy Stucki
2c9d9bf381
Add missing anonymous lifetime
2022-12-20 22:34:42 +01:00
Jeremy Stucki
42d100aad0
Add missing anonymous lifetime
2022-12-20 22:28:22 +01:00
Jeremy Stucki
3dde32ca97
rustc: Remove needless lifetimes
2022-12-20 22:10:40 +01:00
Miguel Ojeda
a65ec44779
Add -Zno-jump-tables
...
This flag mimics GCC/Clang's `-fno-jump-tables` [1][2], which makes
the codegen backend avoid generating jump tables when lowering switches.
In the case of LLVM, the `"no-jump-tables"="true"` function attribute is
added to every function.
The kernel currently needs it for x86 when enabling IBT [3], as well
as for Alpha (plus VDSO objects in MIPS/LoongArch).
[1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables
[2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables
[3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-12-20 21:42:54 +01:00
bors
1d12c3cea3
Auto merge of #105127 - Sp00ph:const_new, r=dtolnay
...
Make `VecDeque::new` const
(See #105072 )
2022-12-20 20:25:42 +00:00
Arvind Mukund
5480ac540c
Use Error
behavior for LLVM versions prior to 15
...
CI fails when building with LLVM-13. This raises unknown behavior
constant `8` from IRVerifier.
2022-12-20 11:47:11 -08:00
Michael Howell
b29a9e3b3f
rustdoc: simplify section anchor CSS
...
Since f50bf8636e
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 Goulet
738b0c0673
Re-enable fn trait call notation error
2022-12-20 18:31:13 +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
Chris Denton
531f3c9ee5
Bump packed_simd_2 and getrandom v0.2
...
Remove old versions 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 `bytecount`. The bigger jump is `getrandom@0.2.0`, but it's 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 )). Note that this doesn't affect `getrandom@0.1.16`, which is already using the latest version of `cfg-if` (besides, there are already plans to remove that entirely).
2022-12-20 15:28:19 +00:00
Oli Scherer
ed61be60da
Some ICE debugging aids
2022-12-20 15:01:37 +00:00
Oli Scherer
fedcc739c6
tracing: make flag checking less noisy
2022-12-20 15:01:37 +00:00
Oli Scherer
b2b859be8c
Some track_caller additions
2022-12-20 15:01:37 +00:00
Oli Scherer
b0ed631ad4
Some hir cleanups
2022-12-20 15:01:37 +00:00
Oli Scherer
c787de3bbd
Fix some ~const
usage in libcore
2022-12-20 15:01:37 +00:00
Oli Scherer
872a6da935
Remove an unused function
2022-12-20 15:00:32 +00:00
Oli Scherer
f1ef038ae4
use track_caller
to show where the panic is actually from
2022-12-20 14:13:29 +00:00
Nilstrieb
fb79e44df6
Remove wrapper functions for some unstable options
...
They are trivial and just forward to the option. Like most other
options, we can just access it directly.
2022-12-20 15:02:15 +01: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
lcnr
750bf36c33
dedup assembly
2022-12-20 07:30:24 +00:00