]> git.lizzy.rs Git - rust.git/log
rust.git
21 months agoGive a better error messages when the rustc shim is missing
Joshua Nelson [Sun, 11 Sep 2022 20:14:03 +0000 (15:14 -0500)]
Give a better error messages when the rustc shim is missing

21 months agoFix pre-existing bug in exe check
Joshua Nelson [Wed, 14 Sep 2022 23:01:18 +0000 (18:01 -0500)]
Fix pre-existing bug in exe check

21 months agoDon't hardcode the path to `bootstrap_out`
Joshua Nelson [Wed, 14 Sep 2022 23:09:33 +0000 (18:09 -0500)]
Don't hardcode the path to `bootstrap_out`

The `rust-dev` dist component puts binaries in `bootstrap/bin`, but we expected them to be in
`bootstrap/debug` to match cargo's behavior.  Rather than making the dist component inconsistent
with other components, make bootstrap slightly smarter and allow using any path as long as all the
binaries are in the same directory.

As a bonus, this greatly simplifies the logic, and makes it possible for the shell scripts to start
avoiding python.

Co-authored-by: Joshua Nelson <github@jyn.dev>
21 months agoMake it possible to run bootstrap on a different machine than the one it was built
Joshua Nelson [Wed, 14 Sep 2022 23:19:28 +0000 (18:19 -0500)]
Make it possible to run bootstrap on a different machine than the one it was built

- Default to trying git rev-parse for the root directory

  CARGO_MANIFEST_DIR is a path on the build machine, not the running machine.
  Don't require this to succeed, to allow building from a tarball; in that case fall back to CARGO_MANIFEST_DIR.

- Set `initial_rustc` to a path based on the path of the running executable, not CARGO_MANIFEST_DIR.

  We only reset `initial_rustc` if we're sure this isn't the working tree bootstrap was originally built in,
  since I'm paranoid that setting this in other cases will cause things to break;
  it's not clear to me when $RUSTC differs from `build/$TARGET/stage0/bin/rustc` (maybe never? but better to be sure).

  Instead, only set this when
  a) We are not using a custom rustc. If someone has specified a custom rustc we should respect their wishes.
  b) We are in a checkout of rust-lang/rust other than the one bootstrap was built in.

21 months agoFix `--dry-run` for `dist::RustDev`
Joshua Nelson [Wed, 14 Sep 2022 23:18:57 +0000 (18:18 -0500)]
Fix `--dry-run` for `dist::RustDev`

21 months agoDistribute bootstrap in CI artifacts
Tuna [Wed, 14 Sep 2022 23:17:05 +0000 (18:17 -0500)]
Distribute bootstrap in CI artifacts

- Add a new `bootstrap` component

Originally, we planned to combine this with the `rust-dev` component.
However, I realized that would force LLVM to be redownloaded whenever bootstrap is modified.
LLVM is a much larger download, so split this to get better caching.

- Build bootstrap for all tier 1 and 2 targets

21 months agoAuto merge of #101673 - crlf0710:generator_clone, r=oli-obk
bors [Sun, 11 Sep 2022 08:50:35 +0000 (08:50 +0000)]
Auto merge of #101673 - crlf0710:generator_clone, r=oli-obk

Allow generators to impl Clone/Copy

Revives #95137. It's a pity that the original pr didn't land because the implementation is almost complete! All credits goes to `@canndrew,` and i just resolved the merge conflicts and updated the feature gate version number.

r? `@oli-obk`

21 months agoAuto merge of #101670 - obi1kenobi:patch-1, r=jyn514
bors [Sun, 11 Sep 2022 06:27:29 +0000 (06:27 +0000)]
Auto merge of #101670 - obi1kenobi:patch-1, r=jyn514

Add @obi1kenobi to the cc list for rustdoc-json-types

I'm one of the maintainers of `cargo-semver-checks`, and as mentioned [in Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Long.20Term.20Rustdoc.20JSON.20Stability) it's very useful to me to know about upcoming rustdoc JSON types changes so I can be ready to publish new `cargo-semver-checks` releases compatible with the new JSON format.

21 months agoUpdate unit test outputs
Charles Lew [Sun, 11 Sep 2022 06:21:40 +0000 (14:21 +0800)]
Update unit test outputs

21 months agoUse current rustc version.
Charles Lew [Sun, 11 Sep 2022 05:57:41 +0000 (13:57 +0800)]
Use current rustc version.

21 months agofix tests after rebase
Andrew Cann [Sun, 10 Apr 2022 07:28:31 +0000 (15:28 +0800)]
fix tests after rebase

21 months agotest async diagnostics for feature(generator_clone)
Andrew Cann [Sun, 10 Apr 2022 07:04:04 +0000 (15:04 +0800)]
test async diagnostics for feature(generator_clone)

21 months agominor fixups as per PR feedback
Andrew Cann [Sun, 10 Apr 2022 06:05:31 +0000 (14:05 +0800)]
minor fixups as per PR feedback

21 months agoAdd some comments to generator clone shim code
Andrew Cann [Sun, 10 Apr 2022 06:04:44 +0000 (14:04 +0800)]
Add some comments to generator clone shim code

21 months agoAdd tracking issue number to feature(generator_clone)
Andrew Cann [Sun, 27 Mar 2022 07:50:40 +0000 (15:50 +0800)]
Add tracking issue number to feature(generator_clone)

21 months agoAdd feature gate tests for generator_clone
Andrew Cann [Mon, 21 Mar 2022 05:57:10 +0000 (13:57 +0800)]
Add feature gate tests for generator_clone

21 months agoApply formatting fixes
Andrew Cann [Mon, 21 Mar 2022 04:57:06 +0000 (12:57 +0800)]
Apply formatting fixes

21 months agomove generator_clone feature definition
Andrew Cann [Mon, 21 Mar 2022 04:56:22 +0000 (12:56 +0800)]
move generator_clone feature definition

Move it to the list of features with no tracking issue, since it has no
tracking issue.

21 months agofix GeneratorWitness: Clone check
Andrew Cann [Fri, 18 Mar 2022 06:24:54 +0000 (14:24 +0800)]
fix GeneratorWitness: Clone check

21 months agoloosen restriction on when GeneratorWitness: Clone
Andrew Cann [Mon, 14 Mar 2022 02:24:10 +0000 (10:24 +0800)]
loosen restriction on when GeneratorWitness: Clone

21 months agoadd generator_clone feature gate
Andrew Cann [Sun, 13 Mar 2022 06:41:44 +0000 (14:41 +0800)]
add generator_clone feature gate

21 months agoimplement Copy/Clone for generators
Andrew Cann [Sun, 13 Mar 2022 05:39:20 +0000 (13:39 +0800)]
implement Copy/Clone for generators

21 months agoAuto merge of #101482 - joboet:netbsd_parker, r=sanxiyn
bors [Sun, 11 Sep 2022 04:07:17 +0000 (04:07 +0000)]
Auto merge of #101482 - joboet:netbsd_parker, r=sanxiyn

Optimize thread parking on NetBSD

As the futex syscall is not present in the latest stable release, NetBSD cannot use the efficient thread parker and locks Linux uses. Currently, it therefore relies on a pthread-based parker, consisting of a mutex and semaphore which protect a state variable. NetBSD however has more efficient syscalls available: [`_lwp_park`](https://man.netbsd.org/_lwp_park.2) and [`_lwp_unpark`](https://man.netbsd.org/_lwp_unpark.2). These already provide the exact semantics of `thread::park` and `Thread::unpark`, but work with thread ids. In `std`, this ID is here stored in an atomic state variable, which is also used to optimize cases were the parking token is already available at the time `thread::park` is called.

r? `@m-ou-se`

21 months agoAdd @obi1kenobi to the cc list for rustdoc-json-types
Predrag Gruevski [Sun, 11 Sep 2022 02:04:57 +0000 (22:04 -0400)]
Add @obi1kenobi to the cc list for rustdoc-json-types

21 months agoAuto merge of #101643 - ChrisDenton:alloc-link-kernel32, r=thomcc
bors [Sun, 11 Sep 2022 01:44:09 +0000 (01:44 +0000)]
Auto merge of #101643 - ChrisDenton:alloc-link-kernel32, r=thomcc

Explicitly link kernel32.lib from alloc

21 months agoAuto merge of #101613 - GuillaumeGomez:codeblock-tooltip, r=notriddle
bors [Sat, 10 Sep 2022 23:13:23 +0000 (23:13 +0000)]
Auto merge of #101613 - GuillaumeGomez:codeblock-tooltip, r=notriddle

Simplify codeblock and their associated tooltip

It is based on https://github.com/rust-lang/rust/pull/101600 so it needs to wait for this one to be merged first.

This PR does two things:

 * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip.
 * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it.

You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref).

r? `@notriddle`

21 months agoAuto merge of #98559 - jackh726:remove-reempty, r=oli-obk
bors [Sat, 10 Sep 2022 20:54:01 +0000 (20:54 +0000)]
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk

Remove ReEmpty

r? rust-lang/types

21 months agostd: optimize thread parking on NetBSD
joboet [Tue, 6 Sep 2022 12:32:45 +0000 (14:32 +0200)]
std: optimize thread parking on NetBSD

21 months agoAuto merge of #101647 - crlf0710:test_for_99551, r=bjorn3
bors [Sat, 10 Sep 2022 17:39:16 +0000 (17:39 +0000)]
Auto merge of #101647 - crlf0710:test_for_99551, r=bjorn3

Fix LLVM IR type mismatch reported in #99551

Closes #99551 .

21 months agoFix pointer value punning.
Charles Lew [Sat, 10 Sep 2022 11:42:51 +0000 (19:42 +0800)]
Fix pointer value punning.

Seems this doesn't trigger error on LLVM 15, but let's fix it for better compatibility.

21 months agoAuto merge of #101652 - Dylan-DPC:rollup-f4atky0, r=Dylan-DPC
bors [Sat, 10 Sep 2022 14:48:34 +0000 (14:48 +0000)]
Auto merge of #101652 - Dylan-DPC:rollup-f4atky0, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #101578 (remove bound var hack in `resolve`)
 - #101606 (doc: fix minor typo)
 - #101614 (Equate fn outputs when inferring RPITIT hidden types)
 - #101631 (rustdoc: avoid cleaning modules with duplicate names)
 - #101635 (Move `Queries::new` out of the macro)
 - #101641 (Update browser-ui-test version to 0.9.8)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agoRollup merge of #101641 - GuillaumeGomez:update-browser-ui-test, r=Dylan-DPC
Dylan DPC [Sat, 10 Sep 2022 13:26:11 +0000 (18:56 +0530)]
Rollup merge of #101641 - GuillaumeGomez:update-browser-ui-test, r=Dylan-DPC

Update browser-ui-test version to 0.9.8

This version improves the error output mostly.

r? `@Dylan-DPC`

21 months agoRollup merge of #101635 - jyn514:queries-new-derived, r=cjgillot
Dylan DPC [Sat, 10 Sep 2022 13:26:10 +0000 (18:56 +0530)]
Rollup merge of #101635 - jyn514:queries-new-derived, r=cjgillot

Move `Queries::new` out of the macro

Split out from https://github.com/rust-lang/rust/pull/101178 to make sure it's not contributing to the perf impact.

r? `@cjgillot`

21 months agoRollup merge of #101631 - rust-lang:notriddle/duplicate-module, r=GuillaumeGomez
Dylan DPC [Sat, 10 Sep 2022 13:26:09 +0000 (18:56 +0530)]
Rollup merge of #101631 - rust-lang:notriddle/duplicate-module, r=GuillaumeGomez

rustdoc: avoid cleaning modules with duplicate names

Fixes #83375

21 months agoRollup merge of #101614 - compiler-errors:rpitit-eq, r=jackh726
Dylan DPC [Sat, 10 Sep 2022 13:26:08 +0000 (18:56 +0530)]
Rollup merge of #101614 - compiler-errors:rpitit-eq, r=jackh726

Equate fn outputs when inferring RPITIT hidden types

When we are trying to infer the hidden types for RPITITs, we need to equate the output tys instead of just subtyping them. For example:

```rust
trait Foo { fn bar() -> impl Sized {} }

impl Foo for () { fn bar() -> &'static str { "" } }
```

If we just subtype the signatures `fn() -> &'static str <: fn() -> _#1t` (where `_#1t` is the variable we've used to infer `impl Sized`), we'll end up `&'static str <: _#1t`, which causes us to infer `_#1t = #'_#2r str`, where `'_#2r` is unconstrained, which gets fixed up to `ReEmpty`, and which is certainly not what we want.

I can't actually think of a way to make this fail to compile, because during borrowck we've already done the method probe, and so we just look at the `impl` method signature and see the `&'static str` any time we call `<() as Foo>::bar()`. But this _does_ cause the ICE [here](https://github.com/rust-lang/rust/pull/98559#issuecomment-1241891994) in `@jackh726's` "Remove ReEmpty" PR (#98559) to stop ICEing, because after that PR we were leaking unconstrained region variables into the typeck results.

r? types

21 months agoRollup merge of #101606 - akhi3030:patch-1, r=Dylan-DPC
Dylan DPC [Sat, 10 Sep 2022 13:26:07 +0000 (18:56 +0530)]
Rollup merge of #101606 - akhi3030:patch-1, r=Dylan-DPC

doc: fix minor typo

21 months agoRollup merge of #101578 - lcnr:resolve-hack, r=jackh726
Dylan DPC [Sat, 10 Sep 2022 13:26:07 +0000 (18:56 +0530)]
Rollup merge of #101578 - lcnr:resolve-hack, r=jackh726

remove bound var hack in `resolve`

somehow dropped that change from #98900.

r? `@jackh726`

21 months agoAuto merge of #100968 - cjgillot:mir-upvar-vec, r=wesleywiser
bors [Sat, 10 Sep 2022 12:07:29 +0000 (12:07 +0000)]
Auto merge of #100968 - cjgillot:mir-upvar-vec, r=wesleywiser

Only compute captures once when building MIR.

21 months agoExplicitly link kernel32.lib from alloc
Chris Denton [Sat, 10 Sep 2022 10:57:36 +0000 (11:57 +0100)]
Explicitly link kernel32.lib from alloc

21 months agoRemove unused temp.
Camille Gillot [Sat, 10 Sep 2022 10:10:04 +0000 (12:10 +0200)]
Remove unused temp.

Co-authored-by: Wesley Wiser <wwiser@gmail.com>
21 months agoAuto merge of #101483 - oli-obk:guaranteed_opt, r=fee1-dead
bors [Sat, 10 Sep 2022 09:50:21 +0000 (09:50 +0000)]
Auto merge of #101483 - oli-obk:guaranteed_opt, r=fee1-dead

The `<*const T>::guaranteed_*` methods now return an option for the unknown case

cc https://github.com/rust-lang/rust/issues/53020#issuecomment-1236932443

I chose `0` for "not equal" and `1` for "equal" and left `2` for the unknown case so backends can just forward to raw pointer equality and it works ✨

r? `@fee1-dead` or `@lcnr`

cc `@rust-lang/wg-const-eval`

21 months agoUpdate browser-ui-test version to 0.9.8
Guillaume Gomez [Sat, 10 Sep 2022 08:26:47 +0000 (10:26 +0200)]
Update browser-ui-test version to 0.9.8

21 months agoUpdate rustdoc GUI tests
Guillaume Gomez [Fri, 9 Sep 2022 14:18:22 +0000 (16:18 +0200)]
Update rustdoc GUI tests

21 months agoSimplify DOM for codeblocks tooltips
Guillaume Gomez [Fri, 9 Sep 2022 14:18:14 +0000 (16:18 +0200)]
Simplify DOM for codeblocks tooltips

21 months agoAuto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr
bors [Sat, 10 Sep 2022 06:55:37 +0000 (06:55 +0000)]
Auto merge of #101639 - matthiaskrgr:rollup-sewkrgm, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #101413 (Use RelocModel::Pic for UEFI targets)
 - #101595 (Fix ICE report flags display.)
 - #101616 (Adapt test for msan message change)
 - #101624 (rustdoc: remove unused CSS `#search { position: relative }`)
 - #101633 (Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page)
 - #101634 (Rustdoc-Json Tests: Use ``@is`` and ``@ismany`` more often.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agoRollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider
Matthias Krüger [Sat, 10 Sep 2022 05:09:23 +0000 (07:09 +0200)]
Rollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider

Rustdoc-Json Tests: Use `@is` and `@ismany` more often.

21 months agoRollup merge of #101633 - aDotInTheVoid:rdj-idl, r=jyn514
Matthias Krüger [Sat, 10 Sep 2022 05:09:22 +0000 (07:09 +0200)]
Rollup merge of #101633 - aDotInTheVoid:rdj-idl, r=jyn514

Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page

Closes #101531

I renamed the `did` field in `ItemLink ` to more accurately describe what it does.

r? `@jyn514`

21 months agoRollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez
Matthias Krüger [Sat, 10 Sep 2022 05:09:21 +0000 (07:09 +0200)]
Rollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez

rustdoc: remove unused CSS `#search { position: relative }`

This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c.

To keep the layout looking the same, the links need to not have `width: 100%` any more, relying instead on the box naturally growing to fit because it has `display: block`.

21 months agoRollup merge of #101616 - TimNN:relax-msan, r=lqd
Matthias Krüger [Sat, 10 Sep 2022 05:09:21 +0000 (07:09 +0200)]
Rollup merge of #101616 - TimNN:relax-msan, r=lqd

Adapt test for msan message change

Similar to rust-lang/rust#100445, this adapts the new test added by rust-lang/rust#99207 to some relatively recent [LLVM changes](https://github.com/llvm/llvm-project/commit/057cabd997aeaef136e1e14f2ee645bd5bb197dd) that removed the function name from msan messages.

Found via our experimental rust + llvm @ HEAD bot:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/13347#018321b2-0cc3-4c91-b4db-774477e8b074

`@rustbot` label +llvm-main

21 months agoRollup merge of #101595 - ehuss:fix-ice-flag-report, r=tmiasko
Matthias Krüger [Sat, 10 Sep 2022 05:09:20 +0000 (07:09 +0200)]
Rollup merge of #101595 - ehuss:fix-ice-flag-report, r=tmiasko

Fix ICE report flags display.

#92310 made some changes to the ICE report that displays the rustc flags, but it introduced a bug where a flag like `-Z incremental-verify-ich=yes` was being treated as-if it was `-Cincremental`. This corrupted the output and made it confusing. The cause was using `starts_with` instead of properly splitting the option.

For example, with the command like `rustc foo.rs -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib` would previously look like:

```
note: compiler flags: -C incremental -Z incremental --crate-type lib
```

It now looks like:

```
note: compiler flags: -C incremental=[REDACTED] -Z incremental-verify-ich=yes --crate-type lib
```

I added a `[REDACTED]` marker for `-Cincremental` so it is a little less confusing that a value has been removed.

Fixes #101588

21 months agoRollup merge of #101413 - nicholasbishop:bishop-remove-uefi-static-reloc, r=petrochenkov
Matthias Krüger [Sat, 10 Sep 2022 05:09:19 +0000 (07:09 +0200)]
Rollup merge of #101413 - nicholasbishop:bishop-remove-uefi-static-reloc, r=petrochenkov

Use RelocModel::Pic for UEFI targets

In https://github.com/rust-lang/rust/pull/100537, the relocation model for UEFI targets was changed from PIC (the default value) to
static. There was some dicussion of this change here: https://github.com/rust-lang/rust/pull/100537#discussion_r952363012

It turns out that this can cause compilation to fail as described in https://github.com/rust-lang/rust/issues/101377, so switch back to PIC.

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

21 months agoAuto merge of #99916 - dpaoliello:stablizerawdylib, r=wesleywiser
bors [Sat, 10 Sep 2022 04:14:34 +0000 (04:14 +0000)]
Auto merge of #99916 - dpaoliello:stablizerawdylib, r=wesleywiser

Stabilize raw-dylib for non-x86

This stabilizes the `raw-dylib` and `link_ordinal` features (#58713) for non-x86 architectures (i.e., `x86_64`, `aarch64` and `thumbv7a`):
* Marked the `raw_dylib` feature as `active`.
* Marked the `link_ordinal` attribute as `ungated`.
* Added new errors if either feature is used on x86 targets without the `raw_dylib` feature being enabled.
* Updated tests to only set the `raw_dylib` feature when building for x86.

21 months agoAuto merge of #101609 - flip1995:clippyup, r=Manishearth
bors [Sat, 10 Sep 2022 01:51:24 +0000 (01:51 +0000)]
Auto merge of #101609 - flip1995:clippyup, r=Manishearth

Update Clippy

r? `@Manishearth`

21 months agorustdoc: add another test case for glob shadowing
Michael Howell [Sat, 10 Sep 2022 01:13:31 +0000 (18:13 -0700)]
rustdoc: add another test case for glob shadowing

21 months agorustdoc: test cases for glob shadowing
Michael Howell [Sat, 10 Sep 2022 01:04:47 +0000 (18:04 -0700)]
rustdoc: test cases for glob shadowing

21 months agorustdoc: implement glob shadowing when doing local inlining
Michael Howell [Sat, 10 Sep 2022 01:04:27 +0000 (18:04 -0700)]
rustdoc: implement glob shadowing when doing local inlining

21 months agoRustdoc-Json Tests: Use `@is` and `@ismany` more often.
Nixon Enraght-Moony [Sat, 10 Sep 2022 00:30:47 +0000 (01:30 +0100)]
Rustdoc-Json Tests: Use `@is` and `@ismany` more often.

21 months agoRustdoc-Json: Correcty handle intra-doc-links to items without HTML page
Nixon Enraght-Moony [Fri, 9 Sep 2022 23:04:10 +0000 (00:04 +0100)]
Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page

Closes #101531

21 months agoAuto merge of #101617 - Dylan-DPC:rollup-iiy4ipc, r=Dylan-DPC
bors [Fri, 9 Sep 2022 23:06:40 +0000 (23:06 +0000)]
Auto merge of #101617 - Dylan-DPC:rollup-iiy4ipc, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #101366 (Restore old behaviour on broken UNC paths)
 - #101492 (Suggest adding array lengths to references to arrays if possible)
 - #101529 (Fix the example code and doctest for Formatter::sign_plus)
 - #101573 (update `ParamKindOrd`)
 - #101612 (Fix code generation of `Rvalue::Repeat` with 128 bit values)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agoStabilze raw-dylib for non-x86
Daniel Paoliello [Fri, 29 Jul 2022 18:18:07 +0000 (11:18 -0700)]
Stabilze raw-dylib for non-x86

21 months agorustdoc: when removing duplicate names, ignore `#[doc(hidden)]` items
Michael Howell [Fri, 9 Sep 2022 22:02:28 +0000 (15:02 -0700)]
rustdoc: when removing duplicate names, ignore `#[doc(hidden)]` items

21 months agoAuto merge of #101611 - GuillaumeGomez:rollup-yw3qtug, r=GuillaumeGomez
bors [Fri, 9 Sep 2022 20:43:13 +0000 (20:43 +0000)]
Auto merge of #101611 - GuillaumeGomez:rollup-yw3qtug, r=GuillaumeGomez

Rollup of 5 pull requests

Successful merges:

 - #101475 (Use futex-based locks and thread parker on Hermit)
 - #101492 (Suggest adding array lengths to references to arrays if possible)
 - #101495 (Compile spin_loop_hint as pause on x86 even without sse2 enabled)
 - #101529 (Fix the example code and doctest for Formatter::sign_plus)
 - #101600 (rustdoc: simplify the codeblock tooltip)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agorustdoc: avoid cleaning modules with duplicate names
Michael Howell [Fri, 9 Sep 2022 19:58:42 +0000 (12:58 -0700)]
rustdoc: avoid cleaning modules with duplicate names

21 months agoUse RelocModel::Pic for UEFI targets
Nicholas Bishop [Sun, 4 Sep 2022 16:42:03 +0000 (12:42 -0400)]
Use RelocModel::Pic for UEFI targets

In https://github.com/rust-lang/rust/pull/100537, the relocation model
for UEFI targets was changed from PIC (the default value) to
static. There was some dicussion of this change here:
https://github.com/rust-lang/rust/pull/100537#discussion_r952363012

It turns out that this can cause compilation to fail as described in
https://github.com/rust-lang/rust/issues/101377, so switch back to PIC.

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

21 months agorustdoc: update test cases
Michael Howell [Fri, 9 Sep 2022 18:48:43 +0000 (11:48 -0700)]
rustdoc: update test cases

Width changed by 2/4 pixels by b273c7502e363baeec293b972f671070e80f1391

21 months agorustdoc: remove unused CSS `#search { position: relative }`
Michael Howell [Fri, 9 Sep 2022 17:09:01 +0000 (10:09 -0700)]
rustdoc: remove unused CSS `#search { position: relative }`

This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its
child `#results` element to be absolutely positioned inside it. The
child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c.

To keep the layout looking the same, the links need to not have
`width: 100%` any more, relying instead on the box naturally growing to
fit because it has `display: block`.

21 months agoRollup merge of #101612 - tmiasko:repeat128, r=lcnr
Dylan DPC [Fri, 9 Sep 2022 16:32:19 +0000 (22:02 +0530)]
Rollup merge of #101612 - tmiasko:repeat128, r=lcnr

Fix code generation of `Rvalue::Repeat` with 128 bit values

Closes #101585.

21 months agoRollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU
Dylan DPC [Fri, 9 Sep 2022 16:32:18 +0000 (22:02 +0530)]
Rollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU

update `ParamKindOrd`

https://github.com/rust-lang/rust/pull/90207#discussion_r767160854 :grin:

writing comments "for future prs" sure works well :3

r? `@BoxyUwU`

21 months agoRollup merge of #101529 - mousetail:patch-2, r=thomcc
Dylan DPC [Fri, 9 Sep 2022 16:32:17 +0000 (22:02 +0530)]
Rollup merge of #101529 - mousetail:patch-2, r=thomcc

Fix the example code and doctest for Formatter::sign_plus

The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers.

This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators.

21 months agoRollup merge of #101492 - TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r...
Dylan DPC [Fri, 9 Sep 2022 16:32:16 +0000 (22:02 +0530)]
Rollup merge of #101492 - TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r=oli-obk

Suggest adding array lengths to references to arrays if possible

ref: https://github.com/rust-lang/rust/pull/100590#pullrequestreview-1096851146

21 months agoRollup merge of #101366 - ChrisDenton:unc-forward-slash, r=m-ou-se
Dylan DPC [Fri, 9 Sep 2022 16:32:16 +0000 (22:02 +0530)]
Rollup merge of #101366 - ChrisDenton:unc-forward-slash, r=m-ou-se

Restore old behaviour on broken UNC paths

This fixes #101358 by restoring the behaviour from previous stable Rust versions. I'm not convinced this is ultimately right but I think it's less wrong and maybe this should be backported to beta?

r? libs

21 months agorelax msan error-pattern due to LLVM changes
Tim Neumann [Fri, 9 Sep 2022 16:15:08 +0000 (16:15 +0000)]
relax msan error-pattern due to LLVM changes

21 months agoEquate fn outputs when inferring RPITIT hidden types
Michael Goulet [Fri, 9 Sep 2022 14:59:54 +0000 (14:59 +0000)]
Equate fn outputs when inferring RPITIT hidden types

21 months agoThe `<*const T>::guaranteed_*` methods now return an option for the unknown case
Oli Scherer [Tue, 6 Sep 2022 14:08:59 +0000 (14:08 +0000)]
The `<*const T>::guaranteed_*` methods now return an option for the unknown case

21 months agoUse memset when repeating 128bit zero value
Tomasz Miąsko [Fri, 9 Sep 2022 00:00:00 +0000 (00:00 +0000)]
Use memset when repeating 128bit zero value

21 months agoIntroduce a fallible variant of LLVMConstIntGetZExtValue
Tomasz Miąsko [Fri, 9 Sep 2022 00:00:00 +0000 (00:00 +0000)]
Introduce a fallible variant of LLVMConstIntGetZExtValue

which verifies that a constant bit width is within 64 bits or fails.

21 months agoRollup merge of #101600 - notriddle:notriddle/li, r=GuillaumeGomez
Guillaume Gomez [Fri, 9 Sep 2022 13:36:38 +0000 (15:36 +0200)]
Rollup merge of #101600 - notriddle:notriddle/li, r=GuillaumeGomez

rustdoc: simplify the codeblock tooltip

**https://github.com/rust-lang/rust/pull/101593 needs merged first**

This PR moves the tooltip into example-wrap, simplifying several overly-complex aspects of how these tooltips work:

* The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside.
* The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself.
* The relative positioning of the `<li>` tag, which was added in https://github.com/rust-lang/rust/commit/e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.

21 months agoRollup merge of #101529 - mousetail:patch-2, r=thomcc
Guillaume Gomez [Fri, 9 Sep 2022 13:36:37 +0000 (15:36 +0200)]
Rollup merge of #101529 - mousetail:patch-2, r=thomcc

Fix the example code and doctest for Formatter::sign_plus

The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers.

This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators.

21 months agoRollup merge of #101495 - bjorn3:pause-no-sse2, r=Mark-Simulacrum
Guillaume Gomez [Fri, 9 Sep 2022 13:36:36 +0000 (15:36 +0200)]
Rollup merge of #101495 - bjorn3:pause-no-sse2, r=Mark-Simulacrum

Compile spin_loop_hint as pause on x86 even without sse2 enabled

The x86 `pause` instruction was introduced with sse2, but because it is encoded as `rep nop`, it works just fine on cpu's without sse2 support. It just doesn't do anything.

21 months agoRollup merge of #101492 - TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r...
Guillaume Gomez [Fri, 9 Sep 2022 13:36:35 +0000 (15:36 +0200)]
Rollup merge of #101492 - TaKO8Ki:suggest-adding-array-length-to-ref-to-array, r=oli-obk

Suggest adding array lengths to references to arrays if possible

ref: https://github.com/rust-lang/rust/pull/100590#pullrequestreview-1096851146

21 months agoRollup merge of #101475 - joboet:hermit_futex_locks, r=m-ou-se
Guillaume Gomez [Fri, 9 Sep 2022 13:36:34 +0000 (15:36 +0200)]
Rollup merge of #101475 - joboet:hermit_futex_locks, r=m-ou-se

Use futex-based locks and thread parker on Hermit

[Hermit now has futex syscalls](https://github.com/hermitcore/libhermit-rs/pull/534), which means Hermit can share the well-tested and performant locks and thread parker used on Linux.

Ping `@mkroening,` `@stlankes`
r? `@m-ou-se`

21 months agorustdoc: simplify the codeblock tooltip
Michael Howell [Fri, 9 Sep 2022 00:46:57 +0000 (17:46 -0700)]
rustdoc: simplify the codeblock tooltip

This commit moves the tooltip into example-wrap, simplifying allowing several
overly-complex things to be fixed:

* The mousover javascript can be removed, because hovering example-wrap can
  style the tooltip inside.
* The sibling selecor can be removed, because hovering the tooltip also
  hovers the wrapper, which can hover the codeblock itself.
* The relative positioning of the `<li>` tag, which was added in
  e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code
  tooltip, can now be removed, because example-wrap itself already has
  relative positioning.

21 months agoreview
lcnr [Fri, 9 Sep 2022 12:28:57 +0000 (14:28 +0200)]
review

21 months agorename `codegen_fulfill_obligation`
lcnr [Fri, 9 Sep 2022 11:36:27 +0000 (13:36 +0200)]
rename `codegen_fulfill_obligation`

21 months agoMerge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup
Philipp Krones [Fri, 9 Sep 2022 11:36:26 +0000 (13:36 +0200)]
Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup

21 months ago`resolve_instance`: remove `BoundVarsCollector`
lcnr [Thu, 8 Sep 2022 15:02:09 +0000 (17:02 +0200)]
`resolve_instance`: remove `BoundVarsCollector`

21 months agostd: use futex-based locks and thread parker on Hermit
joboet [Tue, 6 Sep 2022 08:44:05 +0000 (10:44 +0200)]
std: use futex-based locks and thread parker on Hermit

21 months agodoc: fix minor typo
Akhilesh Singhania [Fri, 9 Sep 2022 09:30:40 +0000 (11:30 +0200)]
doc: fix minor typo

21 months agoAuto merge of #101527 - Kobzol:ci-update-llvm, r=Mark-Simulacrum
bors [Fri, 9 Sep 2022 09:05:59 +0000 (09:05 +0000)]
Auto merge of #101527 - Kobzol:ci-update-llvm, r=Mark-Simulacrum

Update LLVM used in x86 CI dist builds to `15.0.0`

LLVM 15.0.0 has been released, so we can use it in CI builds. We need (at least) LLVM 15 for BOLT, and we regularly update to most recent stable versions. It would also be good to first see the perf. effect of upgrading by itself, to have a better baseline for BOLT.

r? `@Mark-Simulacrum`

21 months agoAuto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr
bors [Fri, 9 Sep 2022 06:24:25 +0000 (06:24 +0000)]
Auto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #99207 (Enable eager checks for memory sanitizer)
 - #101253 (fix the suggestion of format for asm_sub_register)
 - #101450 (Add `const_extern_fn` to 1.62 release notes.)
 - #101556 (Tweak future opaque ty pretty printing)
 - #101563 (Link UEFI target documentation from target list)
 - #101593 (Cleanup themes (tooltip))

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agoRollup merge of #101593 - GuillaumeGomez:cleanup-theme-tooltip, r=notriddle
Matthias Krüger [Fri, 9 Sep 2022 05:02:34 +0000 (07:02 +0200)]
Rollup merge of #101593 - GuillaumeGomez:cleanup-theme-tooltip, r=notriddle

Cleanup themes (tooltip)

No changes in the UI. I used this opportunity to unify the dark theme with the others for the alpha parameter though.

r? `@notriddle`

21 months agoRollup merge of #101563 - sanxiyn:doc-link-uefi, r=ehuss
Matthias Krüger [Fri, 9 Sep 2022 05:02:33 +0000 (07:02 +0200)]
Rollup merge of #101563 - sanxiyn:doc-link-uefi, r=ehuss

Link UEFI target documentation from target list

#99760 added UEFI target documentation, but forgot to link it from the main target list.

21 months agoRollup merge of #101556 - compiler-errors:tweak-generator-print, r=jackh726
Matthias Krüger [Fri, 9 Sep 2022 05:02:32 +0000 (07:02 +0200)]
Rollup merge of #101556 - compiler-errors:tweak-generator-print, r=jackh726

Tweak future opaque ty pretty printing

1. The `Return` type of a generator doesn't need to be a lang item just for diagnostic printing of types
2. We shouldn't suppress the `Output = Ty` of a opaque future if the type is a int or float var.

21 months agoRollup merge of #101450 - ehuss:relnotes-95346, r=Mark-Simulacrum
Matthias Krüger [Fri, 9 Sep 2022 05:02:31 +0000 (07:02 +0200)]
Rollup merge of #101450 - ehuss:relnotes-95346, r=Mark-Simulacrum

Add `const_extern_fn` to 1.62 release notes.

Adds #95346 which did not get tagged with relnotes.

Closes #101443

21 months agoRollup merge of #101253 - lyming2007:issue-101163, r=Amanieu
Matthias Krüger [Fri, 9 Sep 2022 05:02:30 +0000 (07:02 +0200)]
Rollup merge of #101253 - lyming2007:issue-101163, r=Amanieu

fix the suggestion of format for asm_sub_register

modified:   compiler/rustc_typeck/src/check/intrinsicck.rs
modified:   src/test/ui/asm/bad-template.aarch64_mirunsafeck.stderr
modified:   src/test/ui/asm/bad-template.aarch64_thirunsafeck.stderr
modified:   src/test/ui/asm/bad-template.x86_64_mirunsafeck.stderr
modified:   src/test/ui/asm/bad-template.x86_64_thirunsafeck.stderr
modified:   src/test/ui/asm/type-check-1.rs
modified:   src/test/ui/asm/type-check-1.stderr
modified:   src/test/ui/asm/x86_64/type-check-3.stderr

21 months agoRollup merge of #99207 - 5225225:msan-eager-checks, r=jackh726
Matthias Krüger [Fri, 9 Sep 2022 05:02:30 +0000 (07:02 +0200)]
Rollup merge of #99207 - 5225225:msan-eager-checks, r=jackh726

Enable eager checks for memory sanitizer

Fixes #99179

21 months agoAuto merge of #101224 - compiler-errors:rpitit, r=oli-obk
bors [Fri, 9 Sep 2022 03:40:17 +0000 (03:40 +0000)]
Auto merge of #101224 - compiler-errors:rpitit, r=oli-obk

Initial implementation of return-position `impl Trait` in traits

* Create a new item kind, called `ImplTraitPlaceholder`, which is used to lower `ast::TyKind::ImplTrait` in trait method returns.
    * This item is the child of the trait method, which simplifies the way we calculate bounds and stuff.
* Use the def-id of this type to construct a projection type that we use during astconv for the return type of the trait method signature.
* Implement logic to normalize this `ImplTraitPlaceholder` projection type when we know its concrete impl (this is pretty limited currently, but really there are no other selection candidates that make sense -- for now!)
* Check that the `impl Trait`'s bounds are satisfied on the concrete type provided in the impl.

This is obviously nowhere near complete, but I wanted to at least get some initial support landed so we can start playing around with it.

What works:
* async fn in trait and RPITIT, including multiple `impl Trait`s and `impl Trait` nested in associated type bindings, like `impl Future<Output = impl Sized>`

21 months agoFix documentation lint failures
Michael Goulet [Fri, 9 Sep 2022 01:31:36 +0000 (01:31 +0000)]
Fix documentation lint failures

21 months agoAdjust pretty printing of RPITITs
Michael Goulet [Thu, 8 Sep 2022 00:45:09 +0000 (00:45 +0000)]
Adjust pretty printing of RPITITs

21 months agoRebase fallout
Michael Goulet [Thu, 8 Sep 2022 00:26:01 +0000 (00:26 +0000)]
Rebase fallout