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
Michael Goulet
36a91abba3
Assert that closures and generators are made with the right number of substitutions
2023-06-01 22:37:20 +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
Ramon de C Valle
faf31b5052
CFI: Fix cfi with repr(transparent): transform_ty: unexpected Alias(Proj
...
Fixes #111185 by normalizing ty::Alias before encoding.
2023-06-01 19:56:36 +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
0b4c09b1d2
Auto merge of #14941 - Veykril:def-map, r=Veykril
...
Shrink `DefMap`, share crate level items with block def maps
2023-06-01 16:42:12 +00:00
Guillaume Gomez
a825b1e5da
Add regression test where private item with intermediate doc hidden re-export was not inlined
2023-06-01 18:35:00 +02:00
Guillaume Gomez
96892a52ed
Fix bug where private item with intermediate doc hidden re-export was not inlined
2023-06-01 18:29:18 +02: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
Lukas Wirth
11b937177b
Skip extern prelude path resolution in block def maps
2023-06-01 17:58:08 +02:00
Gary
a45fc94652
Update setup.rs
2023-06-01 21:03:42 +05:30
bors
9524cff2b4
Auto merge of #10857 - MarcusGrass:update-configuration-file-doc, r=flip1995
...
Explain which paths clippy searches for configuration in docs
Fixes https://github.com/rust-lang/rust-clippy/issues/9921 .
Adds information on where to place the configuration files, it may be a bit verbose. Also added a comment to the section of the code where the search happens, to hopefully prevent changing that without updating the docs.
changelog: Make documentation about where to place configuration files clearer.
2023-06-01 15:27:25 +00:00
bors
4458e7f190
Auto merge of #14942 - HKalbasi:for-loop-label, r=HKalbasi
...
fix bug in labeled for loop desugaring
fix https://github.com/rust-lang/rust-analyzer/pull/14892#discussion_r1213091393
2023-06-01 14:54:47 +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
hkalbasi
f4c52b40bd
fix bug in labeled for loop desugaring
2023-06-01 17:51:53 +03:30
Lukas Wirth
54e3ef658a
Rename nameres::CrateData to DefMapCrateData
2023-06-01 15:50:19 +02:00
Lukas Wirth
1e6406e223
Move extern prelude into CrateData
2023-06-01 15:49:05 +02:00
Lukas Wirth
bdca349573
Arc DefMap::data so the block def maps can share it
2023-06-01 15:27:05 +02:00
Lukas Wirth
5c466ccc2b
Refactor out some crate wide data in DefMap into nested struct
2023-06-01 15:04:38 +02:00
Lukas Wirth
dc7c6d43c7
Slightly shrink DefMap
2023-06-01 14:46:36 +02:00
Guillaume Gomez
f8a8ec1cfc
Mention GuillaumeGomez in case GUI tests are updated
2023-06-01 12:57:32 +02:00
Tshepang Mbambo
793fa8d7c5
doc: improve explanation
2023-06-01 12:55:58 +02:00
MarcusGrass
194343fcea
Explain path-search using a list
2023-06-01 12:54:20 +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
MarcusGrass
5f5e2e2ac1
Explain which paths clippy searches for configuration in docs
2023-06-01 12:14:55 +02:00