Commit Graph

222047 Commits

Author SHA1 Message Date
lcnr f2e37f7bcd add test
(cherry picked from commit c5ec1b8bc5)
2023-05-25 17:18:46 -07:00
lcnr a365f58bf6 update recursion depth in confirm_candidate
(cherry picked from commit 1708ad65a4)
2023-05-25 17:14:15 -07:00
Michael Goulet 1a42cb7fff Dont check must_use on nested impl Future from fn
(cherry picked from commit 926e874fd1)
2023-05-25 17:14:11 -07:00
bors 16ec1c0a80 Auto merge of #111776 - cuviper:beta-next, r=cuviper
[beta] backport

- debuginfo: split method declaration and definition #111167
- Encode VariantIdx so we can decode ADT variants in the right order #111494
- Simplify find_width_of_character_at_span. #111560

r? cuviper
2023-05-20 02:00:26 +00:00
Mara Bos 7a0af0973c Simplify find_width_of_character_at_span.
(cherry picked from commit 6289c57dc0)
2023-05-19 17:14:44 -07:00
Michael Goulet 8b7deda58d Encode VariantIdx so we can decode variants in the right order
(cherry picked from commit ff54c801f0)
2023-05-19 17:14:22 -07:00
Josh Stone ec1d458777 debuginfo: split method declaration and definition
When we're adding a method to a type DIE, we only want a DW_AT_declaration
there, because LLVM LTO can't unify type definitions when a child DIE is a
full subprogram definition. Now the subprogram definition gets added at the
CU level with a specification link back to the abstract declaration.

(cherry picked from commit 10b69dde3f)
2023-05-19 17:01:39 -07:00
bors 2013813b65 Auto merge of #111290 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[beta] backport

This PR backports:

- #111015: Remove wrong assertion in match checking.
- #110917: only error combining +whole-archive and +bundle for rlibs
- #111201: bootstrap: add .gitmodules to the sources

r? `@Mark-Simulacrum`
2023-05-07 20:10:35 +00:00
Krasimir Georgiev c11cc10558 bootstrap: add .gitmodules to the sources
The bootstrap builder now expects this file to exist:
https://github.com/rust-lang/rust/blob/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/src/bootstrap/builder.rs#L494
2023-05-06 11:14:42 -04:00
Be Wilson 428ac2a66e only error with +whole-archive,+bundle for rlibs
Fixes https://github.com/rust-lang/rust/issues/110912

Checking `flavor == RlibFlavor::Normal` was accidentally lost in
601fc8b36b
https://github.com/rust-lang/rust/pull/105601

That caused combining +whole-archive and +bundle link modifiers on
non-rlib crates to fail with a confusing error message saying that
combination is unstable for rlibs. In particular, this caused the
build to fail when +whole-archive was used on staticlib crates, even
though +whole-archive effectively does nothing on non-bin crates because
the final linker invocation is left to an external build system.
2023-05-06 11:12:53 -04:00
Camille GILLOT 7fc63a62ee Remove wrong assertion. 2023-05-06 11:12:48 -04:00
bors cc38d9fe09 Auto merge of #111180 - weihanglo:update-beta-cargo, r=weihanglo
[beta] Update cargo

2 commits in 84b7041fd2745ee6b3b4a150314f81aabb78e6b2..ec8a8a0cabb0e0cadef58902470f6c7ee7868bdc
2023-04-13 20:08:40 +0000 to 2023-04-25 19:46:25 +0000
- [beta-1.70] backport add the Win32_System_Console feature (rust-lang/cargo#12038)
- [beta-1.70] Backport not_found_permutations test fix. (rust-lang/cargo#11983)

r? `@ghost`
2023-05-05 02:00:31 +00:00
Weihang Lo dd253c0be1 [beta] Update cargo 2023-05-04 09:22:28 +01:00
bors 071f14baae Auto merge of #110871 - cuviper:beta-next, r=cuviper
[beta] backport

This PR backports:

- Encode def span for ConstParam #110425
- Update to LLVM 16.0.2 #110535
- Encode lifetime param spans too #110469
- make sysroot finding compatible with multiarch systems #110281
- Update awscli #110952
- Temporarily disable the jobserver-error test #110361

Also bumps us to the latest released stable, 1.69.0.

r? `@cuviper`
2023-04-30 03:45:19 +00:00
Eric Huss 4e2f52c516 Temporarily disable the jobserver-error test
(cherry picked from commit 79b3af3f62)
2023-04-29 09:53:08 -07:00
Eric Huss 12fcfa089c Update awscli
(cherry picked from commit dd6314f96c)
2023-04-28 13:40:07 -07:00
ozkanonur b93f9e56ae make sysroot finding compatible with multiarch systems
Signed-off-by: ozkanonur <work@onurozkan.dev>
(cherry picked from commit 2e98368c2f)
2023-04-27 08:49:55 -07:00
Michael Goulet 53e5649ae4 Encode lifetime param spans too
(cherry picked from commit 24c2c075cc)
2023-04-27 08:49:27 -07:00
Josh Stone b50332ccfb Bump bootstrap to 1.69.0 2023-04-26 16:24:47 -07:00
Nikita Popov 828d9471bd Update to LLVM 16.0.2
(cherry picked from commit 935b95630a)
2023-04-26 16:19:36 -07:00
Michael Goulet d580176d4d Encode def span for ConstParam
(cherry picked from commit 1ee189cde5)
2023-04-26 16:19:23 -07:00
bors 1b7dd2252b Auto merge of #110414 - pietroalbini:pa-1.70.0-beta, r=Mark-Simulacrum
[beta] Prepare Rust 1.70.0

This PR replaces the version placeholders, and changes the channel to `beta`.

r? `@ghost`
cc `@rust-lang/release`
2023-04-19 10:39:35 +00:00
Pietro Albini 988610a083 update tests for the test harness's json formatting 2023-04-17 11:16:16 +02:00
Pietro Albini 86dfb0d0d1 add support for // unset-exec-env in compiletest 2023-04-17 11:16:13 +02:00
Pietro Albini 58cfc1c97f treat the dev channel as nightly in compiletest 2023-04-17 11:16:12 +02:00
Pietro Albini a27ea2b497 bump the channel to beta 2023-04-16 16:34:03 +02:00
Pietro Albini 8df541968f replace version placeholders 2023-04-16 16:33:38 +02:00
bors ce1073ba9d Auto merge of #110323 - lcnr:dropck-uwu, r=compiler-errors
explicit `adt_dtorck_constraint` for `ManuallyDrop`

the only reason we didn't add outlives requirements when dropping `ManuallyDrop` was a fast-path in `trivial_dropck_outlives`. Explicitly acknowledge that fast-path in `adt_dtorck_constraint`
2023-04-15 10:21:55 +00:00
bors 67e273ba0e Auto merge of #109900 - cjgillot:disable-const-prop, r=oli-obk
Only enable ConstProp at mir-opt-level >= 2.

That pass is not responsible for lints any more, so we can restrict it to optimized builds.

This reduces the amount of duplicated const-eval messages.
2023-04-15 07:58:57 +00:00
Camille GILLOT 483525eed3 Remove obsolete test. 2023-04-15 07:46:47 +00:00
Camille GILLOT c9409136c7 Bless run-make. 2023-04-15 07:46:47 +00:00
Camille GILLOT 4a1ff5e04d Bless codegen test. 2023-04-15 07:46:46 +00:00
Camille GILLOT 9ec086709e Remove outdated comment. 2023-04-15 07:46:46 +00:00
Camille GILLOT 22bf5fd848 Remove useless methods in visit. 2023-04-15 07:46:46 +00:00
Camille GILLOT 8a515aab76 Only enable ConstProp at mir-opt-level >= 2. 2023-04-15 07:46:46 +00:00
bors 825c70658e Auto merge of #110335 - asomers:rust-gdb-freebsd, r=jyn514
Fix rust-gdb on FreeBSD

"\w" is a GNU-specific extension to sed.  Avoid it.

Fixes #110334
Signed-off-by: Alan Somers <asomers@gmail.com>
2023-04-15 05:48:36 +00:00
bors 3312a3053b Auto merge of #109802 - notriddle:notriddle/rustdoc-search-generics-nested, r=GuillaumeGomez
rustdoc-search: add support for nested generics

This change allows `search.js` to parse nested generics (which look `Like<This<Example>>`) and match them. It maintains the existing "bag semantics", so that the order of type parameters is ignored but the number is required to be greater than or equal to what's in the query.

For example, a function with the signature `fn read_all(&mut self: impl Read) -> Result<Vec<u8>, Error>` will match these queries:

* `Read -> Result<Vec<u8>, Error>`
* `Read -> Result<Error, Vec>`
* `Read -> Result<Vec<u8>>`

But it *does not* match `Result<Vec, u8>` or `Result<u8<Vec>>`.
2023-04-15 02:23:32 +00:00
Alan Somers c6b1f31449 Typo fix in src/etc/rust-gdb
Co-authored-by: SNCPlay42 <SNCPlay42@gmail.com>
2023-04-14 19:07:13 -07:00
bors fef27e038e Auto merge of #110142 - Mark-Simulacrum:reduce-core-counts, r=pietroalbini
Reduce core counts for a number of builders

Best reviewed by-commit; first commit renames all builder names to include core counts.

Applied changes for these builders (only on the auto branch, haven't touched PR CI):

- arm-android -> 8 core (currently at 39 minutes; 25.58% CPU)
- armhf-gnu -> 8 core (currently at 31 minutes; 30.97% CPU)
- dist-aarch64-linux -> 8 core (currently at 35 minutes; 55.38% CPU)
- dist-android -> 8 core (currently at 18 minutes; 43.03% CPU)
- dist-armhf-linux -> 8 core (currently at 27 minutes; 54.71% CPU)
- dist-armv7-linux -> 8 core (currently at 29 minutes; 50.33% CPU)
- dist-i586-gnu-i586-i686-musl -> 8 core (currently at 27 minutes; 48.31% CPU)
- dist-i686-linux -> 8 core (currently at 32 minutes; 52.39% CPU)
- dist-mips-linux -> 8 core (currently at 25 minutes; 55.09% CPU)
- dist-mips64-linux -> 8 core (currently at 25 minutes; 55.33% CPU)
- dist-mips64el-linux -> 8 core (currently at 26 minutes; 54.93% CPU)
- dist-mipsel-linux -> 8 core (currently at 25 minutes; 55.38% CPU)
- dist-powerpc-linux -> 8 core (currently at 26 minutes; 55.77% CPU)
- dist-powerpc64-linux -> 8 core (currently at 27 minutes; 55.03% CPU)
- dist-powerpc64le-linux -> 8 core (currently at 27 minutes; 54.95% CPU)
- dist-riscv64-linux -> 8 core (currently at 26 minutes; 54.43% CPU)
- dist-s390x-linux -> 8 core (currently at 30 minutes; 55.97% CPU)
- dist-various-1 -> 8 core (currently at 36 minutes; 29.16% CPU)
- dist-various-2 -> 8 core (currently at 27 minutes; 32.69% CPU)
- dist-x86_64-freebsd -> 8 core (currently at 27 minutes; 51.69% CPU)
- dist-x86_64-illumos -> 8 core (currently at 30 minutes; 54.88% CPU)
- dist-x86_64-musl -> 8 core (currently at 39 minutes; 57.56% CPU)
- dist-x86_64-netbsd -> 8 core (currently at 26 minutes; 55.82% CPU)
- mingw-check -> 8 core (currently at 17 minutes; 35.00% CPU)
- test-various -> 8 core (currently at 22 minutes; 44.84% CPU)
- wasm32 -> 8 core (currently at 19 minutes; 62.94% CPU)
- x86_64-gnu -> 8 core (currently at 32 minutes; 50.31% CPU)
- x86_64-gnu-stable -> 8 core (currently at 32 minutes; 51.23% CPU)
- x86_64-gnu-aux -> 8 core (currently at 22 minutes; 46.39% CPU)
- x86_64-gnu-debug -> 8 core (currently at 21 minutes; 53.93% CPU)
- x86_64-gnu-distcheck -> 8 core (currently at 38 minutes; 55.93% CPU)
- x86_64-gnu-llvm-15 -> 8 core (currently at 34 minutes; 52.99% CPU)
- x86_64-gnu-llvm-14 -> 8 core (currently at 34 minutes; 52.09% CPU)
- x86_64-gnu-llvm-14-stage1 -> 8 core (currently at 33 minutes; 51.13% CPU)
- x86_64-gnu-nopt -> 8 core (currently at 29 minutes; 53.36% CPU)
- x86_64-gnu-tools -> 8 core (currently at 22 minutes; 40.56% CPU)

We may also want to look at merging some of these builders in the future (to deduplicate stage0 builds and such) but that can happen separately - and is more work than just adjusting core counts.

r? `@pietroalbini`
2023-04-15 00:08:07 +00:00
Alan Somers 2f45d197f3 Fix rust-gdb and rust-gdbgui on FreeBSD
"\w" is a GNU-specific extension to sed.  Avoid it.

Fixes #110334
Signed-off-by: Alan Somers <asomers@gmail.com>
2023-04-14 18:06:26 -06:00
Michael Howell 6ce53278e1 Update how-to-read-rustdoc.md 2023-04-14 14:55:45 -07:00
Michael Howell afee2411e3 rustdoc-search: add support for nested generics 2023-04-14 14:55:45 -07:00
bors 158c309513 Auto merge of #110197 - cjgillot:codegen-discr, r=pnkfelix
Do not attempt to commute comparison and cast to codegen discriminants

The general algorithm to compute a discriminant is:
```
relative_tag = tag - niche_start
is_niche = relative_tag <= (ule) relative_max
discr = if is_niche {
    cast(relative_tag) + niche_variants.start()
} else {
    untagged_variant
}
```

We have an optimization branch which attempts to merge the addition and the subtraction by commuting them with the cast. We currently get this optimization wrong.

This PR takes the easiest and safest way: remove the optimization, and let LLVM handle it. (Perf may not agree with that course of action 😅)

There may be a less invasive solution, but I don't have the necessary knowledge of LLVM semantics to find it. Cranelift has the same optimization, which should be handled similarly.
cc `@nikic` and `@bjorn3` if you have a better solution.

Fixes https://github.com/rust-lang/rust/issues/110128
2023-04-14 21:54:56 +00:00
bors 84dd17b56a Auto merge of #110331 - matthiaskrgr:rollup-9vldvow, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #108687 (Reformulate `point_at_expr_source_of_inferred_type` to be more accurate)
 - #109272 (Add Command environment variable inheritance docs)
 - #109947 (Add links from `core::cmp` derives to their traits)
 - #110110 (Use `Display` in top-level example for `PanicInfo`)
 - #110154 (Fix typos in library)
 - #110244 (Remove some unneeded imports / qualified paths)
 - #110328 ([rustdoc] Add explanations for auto-disambiguation when an intra doc link is resolved to a proc-macro and a trait at the same time)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-14 19:38:08 +00:00
Matthias Krüger 0d97522ee7 Rollup merge of #110328 - GuillaumeGomez:auto-disambiguation-proc-trait, r=notriddle
[rustdoc] Add explanations for auto-disambiguation when an intra doc link is resolved to a proc-macro and a trait at the same time

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

r? `@notriddle`
2023-04-14 21:11:13 +02:00
Matthias Krüger d5c7237400 Rollup merge of #110244 - kadiwa4:unnecessary_imports, r=JohnTitor
Remove some unneeded imports / qualified paths

Continuation of #105537.
2023-04-14 21:11:13 +02:00
Matthias Krüger d1c480f986 Rollup merge of #110154 - DaniPopes:library-typos, r=JohnTitor
Fix typos in library

I ran [`typos -w library`](https://github.com/crate-ci/typos) to fix typos in the `library` directory.

Refs #110150
2023-04-14 21:11:12 +02:00
Matthias Krüger 5107c4c556 Rollup merge of #110110 - lukas-code:display-panic-info, r=JohnTitor
Use `Display` in top-level example for `PanicInfo`

Addresses https://github.com/rust-lang/rust/issues/110098.

This confused me as well, when I was writing a `no_std` panic handler for the first time, so here's a better top-level example.

`Display` is stable, prints the `.message()` if available, and falls back to `.payload().downcast_ref<&str>()` if the message is not available. So this example should provide strictly more information and also work for formatted panics.

The old example still exists on the `payload` method.
2023-04-14 21:11:12 +02:00
Matthias Krüger 4b8351f62e Rollup merge of #109947 - clubby789:cmp-macro-crosslink, r=JohnTitor
Add links from `core::cmp` derives to their traits

Fixes #109946
Adds intra-doc links from the `core::cmp` derives to their respective traits, and a link to their derive behaviour

`@rustbot` label +A-docs
2023-04-14 21:11:11 +02:00
Matthias Krüger 13790bec6a Rollup merge of #109272 - schneems:schneems/add-docs-to-command-env-methods, r=Amanieu
Add Command environment variable inheritance docs

The interaction between the environment variable methods can be confusing. Specifically `env_clear` and `remove_env` have a side effects not mentioned: they disable inheriting environment variables from the parent process. I wanted to fully document this behavior as well as explain relevant edge cases in each of the `Command` env methods.

This is further confused by the return of `get_envs` which will return key/None if `remove_env` has been used, but an empty iterator if `env_clear` has been called. Or a non-empty iterator if `env_clear` was called and later explicit mappings are added. Currently there is no way (that I'm able to find) of observing whether or not the internal `env_clear=true` been toggled on the `Command` struct via its public API.

Ultimately environment variable mappings can be in one of several states:

- Explicitly set value (via `envs` / `env`) will take precedence over parent mapping
- Not explicitly set, will inherit mapping from parent
- Explicitly removed via `remove_env`, this single mapping will not inherit from parent
- Implicitly removed via `env_clear`, no mappings will inherit from parent

I tried to represent this in the relevant sections of the docs.

This is my second-ever doc PR (whoop!). I'm happy to take specific or general doc feedback. Also happy to explain the logic behind any changes or additions I made.
2023-04-14 21:11:11 +02:00