Commit Graph

220378 Commits

Author SHA1 Message Date
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
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
John Kåre Alsaker
c4bcac628c Add some assertions 2023-03-19 17:39:34 +01:00
John Kåre Alsaker
486a38723b Split execute_job into execute_job_incr and execute_job_non_incr 2023-03-19 17:39:34 +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
bohan
1775722410 fix: modify the condition that resolve_imports stops 2023-03-19 20:18:45 +08: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
Camille GILLOT
e5a55dc2c5 Prefer if cfg!. 2023-03-19 08:59:11 +00:00
Camille GILLOT
0e866af1f7 Only clear locals that are known to be written to. 2023-03-19 08:58:01 +00: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
Michael Goulet
9174edbae9 Delay overlap errors if errors are involved 2023-03-19 03:45:47 +00:00
Michael Goulet
322c7b6269 Constrain const vars to error if const types are mismatched 2023-03-19 03:45:47 +00: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
Camille GILLOT
38be6f2cbb Implement FixedSizeEncoding for UnusedGenericParams. 2023-03-18 18:53:07 +00:00
bors
4a04d086ca Auto merge of #107224 - nikic:llvm-16, r=cuviper
Upgrade to LLVM 16

This updates Rust to LLVM 16. It also updates our host compiler for dist-x86_64-linux to LLVM 16. The reason for that is that Bolt from LLVM 15 is not capable of compiling LLVM 16 (https://github.com/llvm/llvm-project/issues/61114).

LLVM 16.0.0 has been [released](https://discourse.llvm.org/t/llvm-16-0-0-release/69326) on March 18, while Rust 1.70 will become stable on June 1.

Tested images: `dist-x86_64-linux`, `dist-riscv64-linux` (alt), `dist-x86_64-illumos`, `dist-various-1`, `dist-various-2`, `dist-powerpc-linux`, `wasm32`, `armhf-gnu`
Tested images until the usual IPv6 failures: `test-various`
2023-03-18 18:14:35 +00:00
Alona Enraght-Moony
26cae277c5 Add test for c_variadic in rustdoc-json 2023-03-18 17:59:29 +00:00
bors
2d0a7def33 Auto merge of #108802 - nikic:bolt-update, r=Mark-Simulacrum
Update host compiler to LLVM 16

Update the host compiler for dist-x86_64-linux to LLVM 16. In particular, this pulls in 1de305da42, which is needed to update Rust's own LLVM (https://github.com/rust-lang/rust/pull/107224).
2023-03-18 15:01:35 +00:00
Camille GILLOT
be8b323929 Ignore Inlined spans when computing caller location. 2023-03-18 13:46:17 +00:00
bors
f177b7cb91 Auto merge of #109303 - matthiaskrgr:rollup-usj4ef5, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #107416 (Error code E0794 for late-bound lifetime parameter error.)
 - #108772 (Speed up tidy quite a lot)
 - #109193 (Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests)
 - #109234 (Tweak implementation of overflow checking assertions)
 - #109238 (Fix generics mismatch errors for RPITITs on -Zlower-impl-trait-in-trait-to-assoc-ty)
 - #109283 (rustdoc: reduce allocations in `visibility_to_src_with_space`)
 - #109287 (Use `size_of_val` instead of manual calculation)
 - #109288 (Stabilise `unix_socket_abstract`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-18 11:19:30 +00:00
Matthias Krüger
49a152885d
Rollup merge of #109288 - jmillikin:linux-abstract-socket-addr, r=joshtriplett
Stabilise `unix_socket_abstract`

Fixes https://github.com/rust-lang/rust/issues/85410
2023-03-18 12:04:24 +01:00
Matthias Krüger
0aa0043141
Rollup merge of #109287 - scottmcm:hash-slice-size-of-val, r=oli-obk
Use `size_of_val` instead of manual calculation

Very minor thing that I happened to notice in passing, but it's both shorter and [means it gets `mul nsw`](https://rust.godbolt.org/z/Y9KxYETv5), so why not.
2023-03-18 12:04:24 +01:00
Matthias Krüger
e81a07268b
Rollup merge of #109283 - notriddle:notriddle/visibility-to-src-with-space, r=jsha
rustdoc: reduce allocations in `visibility_to_src_with_space`
2023-03-18 12:04:24 +01:00
Matthias Krüger
8417c93092
Rollup merge of #109238 - spastorino:new-rpitit-12, r=compiler-errors
Fix generics mismatch errors for RPITITs on -Zlower-impl-trait-in-trait-to-assoc-ty

This PR stops reporting errors due to different count of generics on the new synthesized associated types for RPITITs. Those were already reported when we compare the function on the triat with the function on the impl.

r? ``@compiler-errors``
2023-03-18 12:04:23 +01:00
Matthias Krüger
a48d83d556
Rollup merge of #109234 - tmiasko:overflow-checks, r=cjgillot
Tweak implementation of overflow checking assertions

Extract and reuse logic controlling behaviour of overflow checking assertions instead of duplicating it three times.

r? `@cjgillot`
2023-03-18 12:04:23 +01:00
Matthias Krüger
a79925d63f
Rollup merge of #109193 - spastorino:new-rpitit-11, r=compiler-errors
Add revisions for -Zlower-impl-trait-in-trait-to-assoc-ty fixed tests

Needs to go on top of #109198

r? ``@compiler-errors``
2023-03-18 12:04:22 +01:00