Commit Graph

220237 Commits

Author SHA1 Message Date
Vadim Petrochenkov
4d55affc12 rustdoc: Optimize impl sorting during rendering 2023-03-20 19:43:00 +04: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
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
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
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
Nilstrieb
8d706556ea Fix wrong crate name in custom MIR docs 2023-03-19 18:27:40 +01:00
Guillaume Gomez
5a752cd2ca Add test for footnote references in doc summary 2023-03-19 18:02:52 +01:00
Guillaume Gomez
d2d15fe60e Remove footnote references from doc summary 2023-03-19 18:02:52 +01:00
Mark Rousskov
f83dfd9f86 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.
2023-03-19 11:41:55 -04:00
bors
8826b68c62 Auto merge of #109346 - Dylan-DPC:rollup-vszi5bn, r=Dylan-DPC
Rollup of 10 pull requests

Successful merges:

 - #104100 (Allow using `Range` as an `Iterator` in const contexts. )
 - #105793 (Add note for mismatched types because of circular dependencies)
 - #108798 (move default backtrace setting to sys)
 - #108829 (Use Edition 2021 :pat in matches macro)
 - #108973 (Beautify pin! docs)
 - #109003 (Add `useless_anonymous_reexport` lint)
 - #109022 (read_buf_exact: on error, all read bytes are appended to the buffer)
 - #109212 (fix: don't suggest similar method when unstable)
 - #109243 (The name of NativeLib will be presented)
 - #109324 (Implement FixedSizeEncoding for UnusedGenericParams.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-19 15:39:38 +00:00
joboet
500ad26619
tidy: ignore files in .gitignore in mir opt check 2023-03-19 12:53:04 +01:00
Dylan DPC
881c9898ad
Rollup merge of #109324 - cjgillot:fixed-unused-params, r=Nilstrieb
Implement FixedSizeEncoding for UnusedGenericParams.

Using a `Lazy` for actually a `u32` value is 50% overhead, so let's encode the bitset directly.
2023-03-19 15:33:59 +05:30
Dylan DPC
1f0fcf13f5
Rollup merge of #109243 - chenyukang:yukang/fix-ice-109144, r=petrochenkov
The name of NativeLib will be presented

Fixes #109144

I was working on a quick fix, but found change the name from `Option<Symbol>` to `Symbol` make life a little bit easier.
2023-03-19 15:33:59 +05:30
Dylan DPC
879d6f257b
Rollup merge of #109212 - Ezrashaw:no-similar-sugg-for-unstable, r=estebank
fix: don't suggest similar method when unstable

Fixes #109177

Don't display typo suggestions for unstable things, unless the feature flag is enabled.

AFAIK, there are two places this occurs:
- `rustc_resolve`: before type checking, effectively just `FnCtxt::Free`.
- `rustc_hir_typck`: during type checking, for `FnCtxt::Assoc(..)`s.

The linked issue is about the latter, obviously the issue is applicable to both.

r? `@estebank`
2023-03-19 15:33:58 +05:30
Dylan DPC
654204f455
Rollup merge of #109022 - tmiasko:read-buf-exact, r=dtolnay
read_buf_exact: on error, all read bytes are appended to the buffer

Guarantee that when `read_buf_exact` returns, all bytes read will be
appended to the buffer. Including the case when the operations fails.

The motivating use case are operations on a non-blocking reader. When
`read_buf_exact` fails with `ErrorKind::WouldBlock` error, the operation
can be resumed at a later time.
2023-03-19 15:33:58 +05:30
Dylan DPC
462e7e7a10
Rollup merge of #109003 - GuillaumeGomez:useless-anonymous-reexport-lint, r=cjgillot
Add `useless_anonymous_reexport` lint

This is a follow-up of https://github.com/rust-lang/rust/pull/108936. We once again show all anonymous re-exports in rustdoc, however we also wanted to add a lint to let users know that it very likely doesn't have the effect they think it has.
2023-03-19 15:33:57 +05:30
Dylan DPC
c8e112a025
Rollup merge of #108973 - est31:pin_docs, r=Mark-Simulacrum
Beautify pin! docs

This makes pin docs a little bit less jargon-y and easier to read, by

* splitting up the sentences
* making them less interrupted by punctuation
* turning the footnotes into paragraphs, as they contain useful information that shouldn't be hidden in footnotes. Footnotes also interrupt the read flow.
2023-03-19 15:33:57 +05:30
Dylan DPC
acaae90bf5
Rollup merge of #108829 - xfix:use-edition-2021-pat-in-matches, r=Mark-Simulacrum
Use Edition 2021 :pat in matches macro

This makes the macro syntax used in documentation more readable.
2023-03-19 15:33:56 +05:30
Dylan DPC
e458a7949f
Rollup merge of #108798 - devsnek:panic-pal-exception, r=workingjubilee
move default backtrace setting to sys

another PAL exception. moves the default backtrace setting to sys.
2023-03-19 15:33:56 +05:30
Dylan DPC
e9c25b4ad5
Rollup merge of #105793 - lukas-code:circular-deps, r=Mark-Simulacrum
Add note for mismatched types because of circular dependencies

If you have crate A with a dependency on crate B, and crate B with a dev-dependency on A, then you might see "mismatched types" errors on types that seem to be equal. This PR adds a note that explains that the types are different, because crate B is compiled twice, one time with `cfg(test)` and one time without.

I haven't found a good way to create circular dependencies in UI tests, so I abused the incremental tests instead. As a bonus, incremental tests support "cpass" now.

related to https://github.com/rust-lang/rust/issues/22750
2023-03-19 15:33:55 +05:30
Dylan DPC
993b775849
Rollup merge of #104100 - ink-feather-org:const_iter_range, r=the8472,fee1-dead
Allow using `Range` as an `Iterator` in const contexts.

~~based on #102225 by `@fee1-dead~~`
2023-03-19 15:33:55 +05:30
Ezra Shaw
c05bebcd67
fix: fix ICE in custom-test-frameworks feature 2023-03-19 22:11:17 +13:00
bors
825833c269 Auto merge of #14378 - lowr:patch/bump-chalk-0.89, r=lnicola
internal: Bump chalk

This release fixes a problem around GATs (rust-lang/chalk#790). While a regression test is added in chalk's own test suite, I also added one in ours so that we can catch regressions when we move away from chalk.

Fixes #14164
2023-03-19 08:11:09 +00:00
Ryo Yoshida
e12460bbca
Add regression test
so that we can catch regressions when we move away from chalk.
2023-03-19 16:58:10 +09:00
Ryo Yoshida
1d1a86f350
Bump chalk to 0.89 2023-03-19 16:45:26 +09:00
fren_gor
0c51d0dc53
Improve collect_into documentation 2023-03-19 04:24:35 +01:00
yukang
d5558e67ef The name of NativeLib will be presented 2023-03-19 11:23:19 +08:00
bors
ab9bb3ea36 Auto merge of #109326 - nikic:revert-llvm-16, r=the8472
Revert "Auto merge of #107224 - nikic:llvm-16, r=cuviper"

This reverts commit 4a04d086ca, reversing changes made to 2d0a7def33.

The LLVM 16 upgrade is almost certainly responsible for the CI segfaults that were observed after it landed, looking something like this:
```
Building stage1 library artifacts (x86_64-unknown-linux-gnu)
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc - --crate-name ___ --print=file-names -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Csplit-debuginfo=off -Cprefer-dynamic -Cembed-bitcode=yes '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' --target x86_64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 254)
  --- stderr
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0x97f0b3)[0x7faee84e60b3]
  /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7faee77f2090]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/libLLVM-16-rust-1.70.0-nightly.so(+0x7262e06)[0x7faee608fe06]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0xd10ad4)[0x7faee8877ad4]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0xbcb6cc)[0x7faee87326cc]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0xbca804)[0x7faee8731804]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(_RNvXs5_Cs7DTEPoQIU0M_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCsiydnvZ3aRh1_17rustc_codegen_ssa6traits7backend14CodegenBackend15target_features+0x1b)[0x7faee879183b]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(_RNvNtCsbMR7lNZiyEF_15rustc_interface4util17add_configuration+0x37)[0x7faee85d38f7]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(_RNvNtCsbMR7lNZiyEF_15rustc_interface4util14create_session+0x89d)[0x7faee85d439d]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0x989600)[0x7faee84f0600]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0x984380)[0x7faee84eb380]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-fdca23ff32bf7124.so(+0x985ec3)[0x7faee84ecec3]
  /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/libstd-2268eb07c4da6a07.so(rust_metadata_std_e292dd3bffb96032+0xca4ae)[0x7faee7a6f4ae]
  /lib/x86_64-linux-gnu/libpthread.so.0(+0x8609)[0x7faedec0d609]
  /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7faee78ce133]
  [RUSTC-TIMING] ___ test:false 0.203
  rustc exited with signal: 11 (SIGSEGV) (core dumped)
```

r? `@ehuss`
2023-03-18 23:54:40 +00:00
Nikita Popov
4192743ab7 Revert "Auto merge of #107224 - nikic:llvm-16, r=cuviper"
This reverts commit 4a04d086ca, reversing
changes made to 2d0a7def33.
2023-03-18 23:49:24 +01:00