bors
8ebf04225d
Auto merge of #112198 - compiler-errors:rollup-o2xe4of, r=compiler-errors
...
Rollup of 7 pull requests
Successful merges:
- #111670 (Require that const param tys implement `ConstParamTy`)
- #111914 (CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…)
- #112030 (Migrate `item_trait_alias` to Askama)
- #112150 (Support 128-bit atomics on all x86_64 Apple targets)
- #112174 (Fix broken link)
- #112190 (Improve comments on `TyCtxt` and `GlobalCtxt`.)
- #112193 (Check tuple elements are `Sized` in `offset_of`)
Failed merges:
- #112071 (Group rfcs tests)
r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-02 07:57:21 +00:00
Michael Goulet
ebb7f642e4
Rollup merge of #112193 - clubby789:offset-of-tuple-sized, r=est31
...
Check tuple elements are `Sized` in `offset_of`
Fixes #112186
2023-06-01 23:07:39 -07:00
Michael Goulet
2286046412
Rollup merge of #112190 - nnethercote:improve-comments-TyCtxt-GlobalCtxt, r=compiler-errors
...
Improve comments on `TyCtxt` and `GlobalCtxt`.
By adding some non-obvious information that took me a little while to figure out.
r? `@compiler-errors`
2023-06-01 23:07:39 -07:00
Michael Goulet
71982341b4
Rollup merge of #112174 - cuishuang:master, r=jyn514
...
Fix broken link
The previous link is no longer accessible.
Use the latest link.
2023-06-01 23:07:39 -07:00
Michael Goulet
fc557576a4
Rollup merge of #112150 - taiki-e:apple-atomic-128, r=Amanieu
...
Support 128-bit atomics on all x86_64 Apple targets
On x86_64, we currently set `max_atomic_width` to 128 only on macOS.
ad8304a0d5/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs (L8)
However, other x86_64 Apple targets (iOS, tvOS, and watchOS) are also core2+ and support cmpxchg16b.
ad8304a0d5/compiler/rustc_target/src/spec/apple_base.rs (L71-L76)
```console
# Script to get targets that support cmpxchg16b by default:
$ (for target in $(rustc --print target-list); do [[ $target == "x86_64"* ]] && rustc --print cfg --target "$target" | grep -q cmpxchg16b && echo "$target"; done)
x86_64-apple-darwin
x86_64-apple-ios
x86_64-apple-ios-macabi
x86_64-apple-tvos
x86_64-apple-watchos-sim
x86_64h-apple-darwin
```
r? `@Amanieu`
2023-06-01 23:07:38 -07:00
Michael Goulet
8ceb283c92
Rollup merge of #112030 - sladyn98:item-trait-alias, r=GuillaumeGomez
...
Migrate `item_trait_alias` to Askama
This PR migrates `item_trait_alias` to Askama
Refers https://github.com/rust-lang/rust/issues/108868
2023-06-01 23:07:37 -07:00
Michael Goulet
ceec2250a3
Rollup merge of #111914 - rcvalle:rust-cfi-fix-111184, r=compiler-errors
...
CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Bi…
Fixes https://github.com/rust-lang/rust/issues/111184 by encoding ty::Generator parent substs only.
2023-06-01 23:07:37 -07:00
Michael Goulet
24404e6409
Rollup merge of #111670 - compiler-errors:const-param-ty, r=BoxyUwU
...
Require that const param tys implement `ConstParamTy`
1. Require that const param tys implement `ConstParamTy` instead of using `search_for_adt_const_param_violation`
2. Add `StructuralPartialEq` as a supertrait for `ConstParamTy`, since we need to make sure that we derive *both* `PartialEq` and `Eq`
3. Implement `ConstParamTy` for tuples up to 12 (or whatever the default for tuples is)
4. Add some custom diagnostics to `ConstParamTy` errors, to avoid regressions from (1.). It's still not as great as it could be -- will point out inline in comments.
r? `@BoxyUwU`
2023-06-01 23:07:36 -07:00
bors
33c3d10128
Auto merge of #111677 - fee1-dead-contrib:rustc_const_eval-translatable, r=oli-obk,RalfJung
...
Use translatable diagnostics in `rustc_const_eval`
This PR:
* adds a `no_span` parameter to `note` / `help` attributes when using `Subdiagnostic` to allow adding notes/helps without using a span
* has minor tweaks and changes to error messages
2023-06-02 05:11:49 +00:00
bors
774a3d1523
Auto merge of #111553 - cjgillot:mir-e2e, r=scottmcm
...
Add a few MIR pre-codegen tests
r? `@scottmcm`
2023-06-02 02:36:07 +00:00
cui fliter
bbfadf067c
Fix broken link
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-02 09:36:01 +08:00
clubby789
d722f27684
Test invalid tuple field identifiers
2023-06-02 01:33:09 +00:00
clubby789
731601ccd1
Check tuple elements are Sized
in offset_of
2023-06-02 01:18:59 +00:00
Nicholas Nethercote
c625880a41
Improve comments on TyCtxt
and GlobalCtxt
.
2023-06-02 10:07:58 +10:00
bors
f85ab544df
Auto merge of #112184 - matthiaskrgr:rollup-tlh72el, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #111496 (Extra context for unreachable_pub lint)
- #111802 (Make `x test --dry-run` less verbose)
- #112133 (Migrate GUI colors test to original CSS color format)
- #112146 (Fix `src/etc/pre-push.sh` when `build.locked-deps` is already set)
- #112147 (add inline-const test for elided lifetimes being infer vars)
- #112154 (Fix bug in utf16_to_utf8 for zero length strings)
- #112155 (Improve CGU debug printing.)
- #112173 (Mention GuillaumeGomez in case GUI tests are updated)
r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-01 23:39:56 +00:00
Ramon de C Valle
76ff5ec886
CFI: Fix cfi with async: transform_ty: unexpected GeneratorWitness(Binde
...
Fixes #111184 by encoding ty::Generator parent substs only.
2023-06-01 23:22:54 +00:00
Camille GILLOT
d796c600ad
Rebase fallout.
2023-06-01 21:43:52 +00:00
Camille GILLOT
1ad37804a6
Remove brittle test.
2023-06-01 21:41:58 +00:00
Camille GILLOT
b90e165744
Restrict test to x64.
2023-06-01 21:41:58 +00:00
Camille GILLOT
36cae3a3a2
Annotate needs-unwind.
2023-06-01 21:41:58 +00:00
Camille GILLOT
051dd6714c
Remove duplication.
2023-06-01 21:41:58 +00:00
Camille GILLOT
3483e77263
Remove spurious comments.
2023-06-01 21:41:58 +00:00
Camille GILLOT
b0121799b3
Add chained comparison e2e test.
2023-06-01 21:41:58 +00:00
Camille GILLOT
434fa8c26d
Add e2e mir test for checked arithmetic.
2023-06-01 21:41:58 +00:00
Camille GILLOT
2c6f137d9a
Add loop tests.
2023-06-01 21:41:58 +00:00
Camille GILLOT
ae6f97c43d
Make slice_filter a pre-codegen test.
2023-06-01 21:41:58 +00:00
Matthias Krüger
d505702a7e
Rollup merge of #112173 - GuillaumeGomez:mention-on-gui-test-change, r=compiler-errors
...
Mention GuillaumeGomez in case GUI tests are updated
2023-06-01 22:47:33 +02:00
Matthias Krüger
c6aec9459e
Rollup merge of #112155 - nnethercote:debug_dump, r=wesleywiser
...
Improve CGU debug printing.
- Add more total and per-CGU measurements.
- Ensure CGUs are sorted by name before the first `debug_dump` calls, for deterministic output.
- Print items within CGUs in sorted-by-name order, for deterministic output.
- Add some assertions and comments clarifying sortedness of CGUs at various points.
An example, before:
```
INITIAL PARTITIONING (5 CodegenUnits, max=29, min=1, max/min=29.0):
CodegenUnit scev95ysd7g4b0z estimated size 2:
- fn <() as std::process::Termination>::report [(External, Hidden)] [h082b15a6d07338dcE] estimated size 2
CodegenUnit 1j0frgtl72rsz24q estimated size 29:
- fn std::rt::lang_start::<()>::{closure#0} [(External, Hidden)] [h695c7b5d6a212565E] estimated size 17
- fn std::rt::lang_start::<()> [(External, Hidden)] [h4ca942948e9cb931E] estimated size 12
CodegenUnit 5dbzi1e5qm0d7kj2 estimated size 4:
- fn <[closure@std::rt::lang_start<()>::{closure#0}] as std::ops::FnOnce<()>>::call_once - shim [(External, Hidden)] [h24eaa44f03b2b233E] estimated size 1
- fn <fn() as std::ops::FnOnce<()>>::call_once - shim(fn()) [(External, Hidden)] [hf338f5339c3711acE] estimated size 1
- fn <[closure@std::rt::lang_start<()>::{closure#0}] as std::ops::FnOnce<()>>::call_once - shim(vtable) [(External, Hidden)] [h595d414cbb7651d5E] estimated size 1
- fn std::ptr::drop_in_place::<[closure@std::rt::lang_start<()>::{closure#0}]> - shim(None) [(External, Hidden)] [h17a19dcdb40600daE] estimated size 1
CodegenUnit 220m1mqa2mlbg7r3 estimated size 1:
- fn main [(External, Hidden)] [hb29587cdb6db5f42E] estimated size 1
CodegenUnit 4ulbh241f7tvyn7x estimated size 6:
- fn std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()> [(External, Hidden)] [h41dada2c21a1259dE] estimated size 6
```
and after:
```
INITIAL PARTITIONING (9 items, total_size=42; 5 CGUs, max_size=29, min_size=1, max_size/min_size=29.0):
- CGU[0] 1j0frgtl72rsz24q (2 items, size=29):
- fn std::rt::lang_start::<()> [(External, Hidden)] [h4ca942948e9cb931E] (size=12)
- fn std::rt::lang_start::<()>::{closure#0} [(External, Hidden)] [h695c7b5d6a212565E] (size=17)
- CGU[1] 220m1mqa2mlbg7r3 (1 items, size=1):
- fn main [(External, Hidden)] [hb29587cdb6db5f42E] (size=1)
- CGU[2] 4ulbh241f7tvyn7x (1 items, size=6):
- fn std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()> [(External, Hidden)] [h41dada2c21a1259dE] (size=6)
- CGU[3] 5dbzi1e5qm0d7kj2 (4 items, size=4):
- fn <[closure@std::rt::lang_start<()>::{closure#0}] as std::ops::FnOnce<()>>::call_once - shim(vtable) [(External, Hidden)] [h595d414cbb7651d5E] (size=1)
- fn <[closure@std::rt::lang_start<()>::{closure#0}] as std::ops::FnOnce<()>>::call_once - shim [(External, Hidden)] [h24eaa44f03b2b233E] (size=1)
- fn <fn() as std::ops::FnOnce<()>>::call_once - shim(fn()) [(External, Hidden)] [hf338f5339c3711acE] (size=1)
- fn std::ptr::drop_in_place::<[closure@std::rt::lang_start<()>::{closure#0}]> - shim(None) [(External, Hidden)] [h17a19dcdb40600daE] (size=1)
- CGU[4] scev95ysd7g4b0z (1 items, size=2):
- fn <() as std::process::Termination>::report [(External, Hidden)] [h082b15a6d07338dcE] (size=2)
```
r? ``@wesleywiser``
2023-06-01 22:47:33 +02:00
Matthias Krüger
a66ba9b10b
Rollup merge of #112154 - ShaneEverittM:zero-len-utf16, r=thomcc
...
Fix bug in utf16_to_utf8 for zero length strings
This fixes the behavior of sending EOF by pressing Ctrl+Z => Enter in a windows console.
Previously, that would trip the unpaired surrogate error, whereas now we correctly detect EOF.
2023-06-01 22:47:32 +02:00
Matthias Krüger
20b25d233a
Rollup merge of #112147 - zirconium-n:issue-110934, r=compiler-errors
...
add inline-const test for elided lifetimes being infer vars
Fixes #110934
2023-06-01 22:47:32 +02:00
Matthias Krüger
8f0e1442b0
Rollup merge of #112146 - jyn514:locked-deps, r=clubby789
...
Fix `src/etc/pre-push.sh` when `build.locked-deps` is already set
Before, cargo would error:
```
; git push
Running pre-push script /home/jyn/src/rust/x test tidy
Building bootstrap
Finished dev [unoptimized] target(s) in 0.02s
Build stage0 tool tidy (x86_64-unknown-linux-gnu)
error: the argument '--locked' cannot be used multiple times
Usage: cargo build [OPTIONS]
For more information, try '--help'.
Build completed unsuccessfully in 0:00:00
error: failed to push some refs to 'github.com:jyn514/rust.git'
```
2023-06-01 22:47:31 +02:00
Matthias Krüger
955bba36ea
Rollup merge of #112133 - GuillaumeGomez:migrate-gui-test-color-10, 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-06-01 22:47:31 +02:00
Matthias Krüger
6930a944c7
Rollup merge of #111802 - jyn514:less-verbose, r=ozkanonur
...
Make `x test --dry-run` less verbose
The new output looks like `Testing stage2 book rustc (x86_64-unknown-linux-gnu)`.
Previously, this would print a message for each doctest, which was quite verbose:
```
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/exploit-mitigations.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/instrument-coverage.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/json.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/linker-plugin-lto.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/groups.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/index.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/levels.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/aarch64-apple-ios-sim.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/aarch64-nintendo-switch-freestanding.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/apple-watchos.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv4t-none-eabi.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv5te-none-eabi.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv6k-nintendo-3ds.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-sony-vita-newlibeabihf.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabihf.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/esp-idf.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/fuchsia.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/kmc-solid.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/loongarch-linux.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/mipsel-sony-psx.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/nto-qnx.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/openbsd.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/openharmony.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/riscv32imac-unknown-xous-elf.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/unknown-uefi.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/wasm64-unknown-unknown.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/x86_64-unknown-none.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/profile-guided-optimization.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/target-tier-policy.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/targets/custom.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/targets/index.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/tests/index.md
doc tests for: /home/jyn/src/rust/src/doc/rustc/src/what-is-rustc.md
```
2023-06-01 22:47:30 +02:00
Matthias Krüger
e7ec428cad
Rollup merge of #111496 - mpalmer:unreachable-pub-docs, r=pnkfelix
...
Extra context for unreachable_pub lint
While experienced Rustaceans no doubt know this sort of thing already, as more of a newbie I had trouble understanding why I was triggering the lint. Hopefully this expanded explanation saves someone else some head-scratching.
Fixes #110922
2023-06-01 22:47:30 +02:00
bors
d59363ad0b
Auto merge of #111660 - Kobzol:try-build-skip-docs, r=mark-simulacrum
...
Do not build docs in try builds
This PR adds a new environment variable to the optimized build Python script, which causes it to ignore certain parts of the final `dist` build (mainly docs) in try builds. This reduces the duration of try builds by ~10 minutes.
2023-06-01 20:44:23 +00:00
sladynnunes
780719b2dc
Migrate to Askama
...
Implemented wrap_item_write
Update wrap_item
2023-06-01 12:07:58 -07:00
Michael Goulet
97bacbab57
Remove adt_const_params usage from compiler
2023-06-01 18:21:42 +00:00
Michael Goulet
847d50453c
Implement custom diagnostic for ConstParamTy
2023-06-01 18:21:42 +00:00
Michael Goulet
a9fcb524ff
Impl ConstParamTy for tuples, make PartialStructuralEq a supertrait too
2023-06-01 18:21:42 +00:00
Michael Goulet
8ab10bacdf
remove search_for_adt_const_param_violation
2023-06-01 18:03:59 +00:00
Boxy
bbf41279fa
Require that const param tys implement ConstParamTy
2023-06-01 18:03:59 +00:00
bors
789dd0b2a2
Auto merge of #112040 - cjgillot:separate-const-switch, r=oli-obk
...
Enable ConstGoto and SeparateConstSwitch passes by default
These 2 passes implement a limited form of jump-threading.
Filing this PR to see if enabling them would be lighter than https://github.com/rust-lang/rust/pull/107009 .
2023-06-01 16:04:40 +00:00
Deadbeef
f6c2bc5c24
fix diagnostic message
2023-06-01 14:45:19 +00:00
Deadbeef
f964b46451
improve debug message by eagerly translating
2023-06-01 14:45:19 +00:00
Deadbeef
4f83717cf7
Use translatable diagnostics in rustc_const_eval
2023-06-01 14:45:18 +00:00
Guillaume Gomez
f8a8ec1cfc
Mention GuillaumeGomez in case GUI tests are updated
2023-06-01 12:57:32 +02:00
bors
642c92e630
Auto merge of #112002 - saethlin:enable-sroa, r=oli-obk,scottmcm
...
Enable ScalarReplacementOfAggregates in optimized builds
Like MatchBranchSimplification, this pass is known to produce significant runtime improvements in Cranelift artifacts, and I believe based on the perf runs here that the primary effect of this pass is to empower MatchBranchSimplification. ScalarReplacementOfAggregates on its own has little effect on anything, but when this was rebased up to include https://github.com/rust-lang/rust/pull/112001 we started seeing significant and majority-positive results.
Based on the fact that we see most of the regressions in debug builds (https://github.com/rust-lang/rust/pull/112002#issuecomment-1566270144 ) and some rather significant ones in cycles and wall time, I'm only enabling this in optimized builds at the moment.
2023-06-01 10:47:14 +00:00
bors
fabf929863
Auto merge of #112164 - Dylan-DPC:rollup-93zj7jw, r=Dylan-DPC
...
Rollup of 7 pull requests
Successful merges:
- #108459 (rustdoc: Fix LinkReplacer link matching)
- #111318 (Add a distinct `OperandValue::ZeroSized` variant for ZSTs)
- #111892 (rustdoc: add interaction delays for tooltip popovers)
- #111980 (Preserve substs in opaques recorded in typeck results)
- #112024 (Don't suggest break through nested items)
- #112128 (Don't compute inlining status of mono items in advance.)
- #112141 (remove reference to Into in ? operator core/std docs, fix #111655 )
Failed merges:
- #112071 (Group rfcs tests)
r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-01 08:06:07 +00:00
Jakub Beránek
db113b1c2b
Do not build components unneeded for perf bot in try builds
2023-06-01 08:29:19 +02:00
Dylan DPC
129c559764
Rollup merge of #112141 - anna-singleton:issue-111655-fix, r=thomcc
...
remove reference to Into in ? operator core/std docs, fix #111655
remove the text stating that `?` uses `Into::into` and add text stating it uses `From::from` instead. This closes #111655 .
2023-06-01 11:09:45 +05:30