Commit Graph

220423 Commits

Author SHA1 Message Date
yukang
cbb8066321 Avoid ICE of attempt to add with overflow in emitter 2023-03-21 01:23:28 +08:00
Andy Russell
bb7c373fdf
migrate compiler, bootstrap, and compiletest to windows-rs 2023-03-20 13:19:35 -04:00
clubby789
f321144a56 Add example for Option::product and Result::product 2023-03-20 16:11:59 +00:00
Krasimir Georgiev
e4a4064480 adapt tests/codegen/vec-shrink-panik for LLVM 17
After 0d4a709bb8
LLVM now doesn't generate references to panic_cannot_unwind:

@nikic:
https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/a.20couple.20codegen.20test.20failures.20after.20llvm.200d4a709bb876824a/near/342664944
>Okay, so LLVM now realizes that double panic is not possible, so that's fine.
2023-03-20 15:33:57 +00:00
Andy Wang
f404f33c21
Use builtin_index instead of match
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2023-03-20 16:27:44 +01:00
Andy Wang
e24f5ac56b
Fix off-by-one in mir syntax doc 2023-03-20 15:27:40 +01:00
Andy Wang
8e4e55e524
Support aggregate expressions 2023-03-20 15:25:11 +01:00
Andy Wang
9dc275bb54
Add documentation for type RET = ... 2023-03-20 15:23:27 +01:00
bors
13b7aa4d7f Auto merge of #108524 - Zoxc:node-backtrace, r=cjgillot
Optimize dep node backtrace and ignore fatal errors

This attempts to optimize https://github.com/rust-lang/rust/pull/91742 while also passing through fatal errors.

r? `@cjgillot`
2023-03-20 11:54:00 +00:00
Andy Wang
9da1da94ef
Allow optional RET type annotation 2023-03-20 12:21:19 +01:00
Michael Woerister
40fc42371f Limited the number of parallel link jobs during LLVM build for mingw.
This is an attempt to fix the spurious build error tracked by
https://github.com/rust-lang/rust/issues/108227.
2023-03-20 10:51:04 +01:00
lcnr
5b4fa5bf98 fix typo 2023-03-20 10:46:43 +01:00
Matthias Krüger
58ffabbb90
Rollup merge of #109365 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook

This updates mdbook from 0.4.25 to 0.4.28.
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0428

The primary changes are some interaction fixes for Mobile Safari and removing custom scrollbars on webkit browsers, along with a few other fixes.
2023-03-20 09:46:55 +01:00
Matthias Krüger
f21c435801
Rollup merge of #109364 - compiler-errors:gat-const-arg, r=BoxyUwU
Only expect a GAT const param for `type_of` of GAT const arg

IDK why we were account for both `is_ty_or_const` instead of just for a const param, since we're computing the `type_of` a const param specifically.

Fixes #109300
2023-03-20 09:46:54 +01:00
Matthias Krüger
3efecba6e7
Rollup merge of #109307 - cjgillot:inline-location, r=compiler-errors
Ignore `Inlined` spans when computing caller location.

Fixes https://github.com/rust-lang/rust/issues/105538
2023-03-20 09:46:54 +01:00
Matthias Krüger
d86fd83ef6
Rollup merge of #109277 - spastorino:new-rpitit-14, r=compiler-errors
Fix generics_of for impl's RPITIT synthesized associated type

The only useful commit is the last one.

This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used.
This solution is better but we still need to fix resolution of the generated generics.

r? ``@compiler-errors``
2023-03-20 09:46:53 +01:00
Matthias Krüger
88caa29ae3
Rollup merge of #109273 - WaffleLapkin:slice_is_sorted_by_array_windows, r=scottmcm
Make `slice::is_sorted_by` implementation nicer

Just tweak implementation a little :)

r? `@thomcc`
2023-03-20 09:46:53 +01:00
Matthias Krüger
023079fb86
Rollup merge of #109267 - jyn514:test-configure, r=Mark-Simulacrum
Add tests for configure.py

I highly recommend reviewing this with whitespace disabled.

Notably, verifying that we generate valid toml relies on python 3.11 so
we can use `tomllib`, so this also switches`x86_64-gnu-llvm-14` (one of the PR builders) to use 3.11.

While fixing that, I noticed that we stopped testing python2.7 support on PR CI in https://github.com/rust-lang/rust/pull/106085. `@fee1-dead` `@pietroalbini` please be more careful in the future, there is no CI for CI itself that verifies we are testing everything we should be.

- Separate out functions so that each unit test doesn't create a file on disk
- Add a few unit tests
2023-03-20 09:46:52 +01:00
Matthias Krüger
0e8085a095
Rollup merge of #109266 - petrochenkov:docice4, r=petrochenkov
rustdoc: Correctly merge import's and its target's docs in one more case

Fixes https://github.com/rust-lang/rust/issues/108334.
Fixes https://github.com/rust-lang/rust/issues/108378.
Fixes https://github.com/rust-lang/rust/issues/108658.
2023-03-20 09:46:52 +01:00
Matthias Krüger
96d5dd6fca
Rollup merge of #109170 - eggyal:xc-linux-cmake, r=Mark-Simulacrum
Set `CMAKE_SYSTEM_NAME` for Linux targets

When bootstrap compiles native dependencies like LLVM, it should set `CMAKE_SYSTEM_NAME` for the target system; otherwise cmake may not identify that it is cross-compiling.

In particular, when building a Linux rustc on a macOS host, cmake was including `-isysroot /path/to/macOS.sdk` options that caused things to break.  By setting `CMAKE_SYSTEM_NAME=Linux` when building for Linux targets, the macOS SDK is no longer passed as sysroot to the compiler.

r? bootstrap
2023-03-20 09:46:51 +01:00
bors
356c651e6d Auto merge of #109377 - lnicola:rust-analyzer-2023-03-20, r=lnicola
⬆️ rust-analyzer

r? `@ghost`
2023-03-20 08:44:05 +00:00
Laurențiu Nicola
0f499b414a ⬆️ rust-analyzer 2023-03-20 08:31:01 +02:00
bors
e91364bcf5 Auto merge of #109376 - matthiaskrgr:rollup-0aut57k, r=matthiaskrgr
Rollup of 13 pull requests

Successful merges:

 - #109249 (Update names/comments for new return-position impl trait in trait lowering strategy)
 - #109259 (rustdoc: Fix missing private inlining)
 - #109269 (rustdoc: cleanup some intermediate allocs)
 - #109301 (fix: fix ICE in `custom-test-frameworks` feature)
 - #109319 (Add test for `c_variadic` in rustdoc-json)
 - #109323 (Ignore files in .gitignore in mir opt check)
 - #109331 (rustdoc: implement bag semantics for function parameter search)
 - #109337 (Improve `Iterator::collect_into` documentation)
 - #109351 (rustdoc: Remove footnote references from doc summary)
 - #109353 (Fix wrong crate name in custom MIR docs)
 - #109362 (Split `items` from `-Zmeta-stats` in two.)
 - #109370 (fix ClashingExternDeclarations lint ICE)
 - #109375 (rustdoc: Fix improper escaping of deprecation reasons)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-20 06:13:10 +00:00
Matthias Krüger
130923586d
Rollup merge of #109375 - clubby789:unescape-deprecated-doc, r=jsha
rustdoc: Fix improper escaping of deprecation reasons

Fix #109374

r? `@jsha`
2023-03-20 07:10:35 +01:00
Matthias Krüger
eb1f8dc2cb
Rollup merge of #109370 - DaniPopes:issue-109334, r=Nilstrieb
fix ClashingExternDeclarations lint ICE

Fixes #109334

First "real" contribution, please let me know if I did something wrong.

As I understand it, it's OK if a `#[repr(transparent)]` type has no non-zero sized types (aka is a ZST itself) and the function should just return the type normally instead of panicking

r? `@Nilstrieb`
2023-03-20 07:10:34 +01:00
Matthias Krüger
cd9fadea5b
Rollup merge of #109362 - nnethercote:split-meta-stats-items, r=bjorn3
Split `items` from `-Zmeta-stats` in two.

Because it's one of the biggest sections.

r? `@bjorn3`
2023-03-20 07:10:34 +01:00
Matthias Krüger
5ae1ce80ce
Rollup merge of #109353 - Nilstrieb:rustc-mir-building, r=compiler-errors
Fix wrong crate name in custom MIR docs
2023-03-20 07:10:34 +01:00
Matthias Krüger
39e09ac334
Rollup merge of #109351 - GuillaumeGomez:no-footnote-in-summary, r=notriddle
rustdoc: Remove footnote references from doc summary

Since it's one line, we don't have the footnote definition so it doesn't make sense to have the reference.

Part of https://github.com/rust-lang/rust/issues/109024.

r? `@notriddle`
2023-03-20 07:10:33 +01:00
Matthias Krüger
fb4f015ea3
Rollup merge of #109337 - frengor:collect_into_doc, r=scottmcm
Improve `Iterator::collect_into` documentation

This improves the examples in the documentation of `Iterator::collect_into`, replacing the usages of `println!` with `assert_eq!` as suggested on [IRLO](https://internals.rust-lang.org/t/18534/9).
2023-03-20 07:10:33 +01:00
Matthias Krüger
272afbe7f8
Rollup merge of #109331 - notriddle:notriddle/search-bag-semantics, r=GuillaumeGomez
rustdoc: implement bag semantics for function parameter search

This tweak to the function signature search engine makes things so that, if a type is repeated in the search query, it'll only match if the function actually includes it that many times.
2023-03-20 07:10:32 +01:00
Matthias Krüger
4f61ce23fc
Rollup merge of #109323 - joboet:ignore_ds_store_tidy, r=ozkanonur
Ignore files in .gitignore in mir opt check

This caused `./x test tidy` to fail for me when Finder (macOS) added `.DS_Store` files. They are ignored by git, so tidy should ignore them, too.
2023-03-20 07:10:32 +01:00
Matthias Krüger
7c69f98563
Rollup merge of #109319 - aDotInTheVoid:rdj-variadic-test, r=notriddle
Add test for `c_variadic` in rustdoc-json

Helps with #81359
2023-03-20 07:10:31 +01:00
Matthias Krüger
5d3f460708
Rollup merge of #109301 - Ezrashaw:fix-ctf-ice, r=Nilstrieb
fix: fix ICE in `custom-test-frameworks` feature

Fixes #107454

Simple fix to emit error instead of ICEing. At some point, all the code in `tests.rs` should be refactored, there is a bit of duplication (this PR's code is repeated five times over lol).

r? `@Nilstrieb` (active on the linked issue?)
2023-03-20 07:10:31 +01:00
Matthias Krüger
fdb1eefc73
Rollup merge of #109269 - klensy:rdoc-s, r=notriddle
rustdoc: cleanup some intermediate allocs

First commit self contained, second one use `display_fn` for `extra_info_tags`
2023-03-20 07:10:30 +01:00
Matthias Krüger
c07679989a
Rollup merge of #109259 - GuillaumeGomez:fix-missing-private-inlining, r=notriddle
rustdoc: Fix missing private inlining

Fixes https://github.com/rust-lang/rust/issues/109258.

If the item isn't inlined, it shouldn't have been added into `view_item_stack`. The problem here was that it was not removed, preventing sub items to be inlined if they have a re-export in "upper levels".

cc `@epage`
r? `@notriddle`
2023-03-20 07:10:30 +01:00
Matthias Krüger
ede3c39fe6
Rollup merge of #109249 - compiler-errors:new-rpitit-comments, r=spastorino
Update names/comments for new return-position impl trait in trait lowering strategy

r? `@spastorino`

totally cosmetic
2023-03-20 07:10:30 +01:00
clubby789
c74f2dc588 Fix improper escaping of deprecation reasons 2023-03-20 05:21:51 +00:00
Michael Goulet
4fd66d70cb Update some names and comments 2023-03-20 04:51:53 +00:00
Michael Goulet
239ec6cb11 drive-by: Fix a comment in TyCtxt::fold_regions and remove an unused method 2023-03-20 04:50:07 +00:00
Michael Goulet
9f80c75703 Walk un-shifted nested impl Trait in trait when setting up default trait method assumptions 2023-03-20 04:50:02 +00:00
bors
9d0eac4d02 Auto merge of #108148 - parthopdas:master, r=oli-obk
Implementing "<test_binary> --list --format json" for use by IDE test explorers / runners

Fixes #107307

PR 1 of 2 - wiring up just the new information + implement the command line changes i.e. --format json + tests

upcoming:
PR 2 of 2 - clean up "#[cfg(not(bootstrap))]" from PR 1

As per the discussions on
- MCP: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implementing.20.22.3Ctest_binary.3E.20--list.20--form.E2.80.A6.20compiler-team.23592/near/328747548
- preRFC: https://internals.rust-lang.org/t/pre-rfc-implementing-test-binary-list-format-json-for-use-by-ide-test-explorers-runners/18308
- FYI on Discord: https://discord.com/channels/442252698964721669/459149169546887178/1075581549409484820
2023-03-20 03:24:27 +00:00
Michael Howell
5451fe7d7c rustdoc: implement bag semantics for function parameter search
This tweak to the function signature search engine makes things so that,
if a type is repeated in the search query, it'll only match if the
function actually includes it that many times.
2023-03-19 18:19:24 -07:00
DaniPopes
7ab612a7ee
remove bad comment 2023-03-20 00:55:36 +01:00
DaniPopes
8ca0f61fe3
fix ClashingExternDeclarations lint ICE 2023-03-20 00:50:03 +01:00
Michael Goulet
dbedf4003f Reformat type_of 2023-03-19 23:46:09 +00:00
Michael Goulet
252fa78283 Only expect a GAT const arg 2023-03-19 23:46:09 +00:00
Alona Enraght-Moony
69a82f7f34 add myself to mailmap 2023-03-19 23:11:08 +00:00
Eric Huss
18ea16c8a0 Update mdbook 2023-03-19 14:49:42 -07:00
Nicholas Nethercote
cb587e7f61 Split items from -Zmeta-stats in two.
Because it's one of the biggest sections.
2023-03-20 07:23:47 +11:00
bors
da7c50c089 Auto merge of #109332 - Mark-Simulacrum:runner-switch, r=pietroalbini
Move us to the new large runners pool

For now this keeps all the configuration identical (AFAICT) but we'll likely want to play with the specifics to move some of the slower builders to larger machines and the faster builders to smaller machines, likely reducing overall usage and improving CI times. I think we should leave that to later though, not worry about it just yet.

r? `@pietroalbini`
2023-03-19 19:10:16 +00:00