Commit Graph

199717 Commits

Author SHA1 Message Date
Dylan DPC
6afbe3eca9
Rollup merge of #101631 - rust-lang:notriddle/duplicate-module, r=GuillaumeGomez
rustdoc: avoid cleaning modules with duplicate names

Fixes #83375
2022-09-10 18:56:09 +05:30
Dylan DPC
f1412a665f
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
2022-09-10 18:56:08 +05:30
Dylan DPC
33d54c4f73
Rollup merge of #101606 - akhi3030:patch-1, r=Dylan-DPC
doc: fix minor typo
2022-09-10 18:56:07 +05:30
Dylan DPC
2386ed9962
Rollup merge of #101578 - lcnr:resolve-hack, r=jackh726
remove bound var hack in `resolve`

somehow dropped that change from #98900.

r? `@jackh726`
2022-09-10 18:56:07 +05:30
bors
2e44c17c12 Auto merge of #100968 - cjgillot:mir-upvar-vec, r=wesleywiser
Only compute captures once when building MIR.
2022-09-10 12:07:29 +00:00
Chris Denton
931e851144
Explicitly link kernel32.lib from alloc 2022-09-10 11:57:36 +01:00
Camille Gillot
bcbd183ca3
Remove unused temp.
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
2022-09-10 12:10:04 +02:00
bors
5197c96c49 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`
2022-09-10 09:50:21 +00:00
Guillaume Gomez
6302530107 Update browser-ui-test version to 0.9.8 2022-09-10 10:26:51 +02:00
Guillaume Gomez
8ba06d4b91 Update rustdoc GUI tests 2022-09-10 10:18:32 +02:00
Guillaume Gomez
30168bd06b Simplify DOM for codeblocks tooltips 2022-09-10 10:18:32 +02:00
bors
db9d86b58d 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
2022-09-10 06:55:37 +00:00
Matthias Krüger
973059e1e7
Rollup merge of #101634 - aDotInTheVoid:rdj-test, r=CraftSpider
Rustdoc-Json Tests: Use `@is` and `@ismany` more often.
2022-09-10 07:09:23 +02:00
Matthias Krüger
2566e31a87
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`
2022-09-10 07:09:22 +02:00
Matthias Krüger
227e25a8d8
Rollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez
rustdoc: remove unused CSS `#search { position: relative }`

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

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`.
2022-09-10 07:09:21 +02:00
Matthias Krüger
27afe55860
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](057cabd997) 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
2022-09-10 07:09:21 +02:00
Matthias Krüger
3ddb0482a3
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
2022-09-10 07:09:20 +02:00
Matthias Krüger
857a43d2c8
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
2022-09-10 07:09:19 +02:00
bors
cedd26b1ea 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.
2022-09-10 04:14:34 +00:00
bors
87eb3e2dfa Auto merge of #101609 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2022-09-10 01:51:24 +00:00
Michael Howell
d92d642707 rustdoc: add another test case for glob shadowing 2022-09-09 18:13:31 -07:00
Michael Howell
c1aea94ee7 rustdoc: test cases for glob shadowing 2022-09-09 18:05:33 -07:00
Michael Howell
56e9ec547a rustdoc: implement glob shadowing when doing local inlining 2022-09-09 18:04:27 -07:00
Nixon Enraght-Moony
5634b26ed6 Rustdoc-Json Tests: Use @is and @ismany more often. 2022-09-10 01:30:47 +01:00
Nixon Enraght-Moony
2c17099671 Rustdoc-Json: Correcty handle intra-doc-links to items without HTML page
Closes #101531
2022-09-10 00:40:30 +01:00
bors
395e56f398 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
2022-09-09 23:06:40 +00:00
Daniel Paoliello
c7475011a3 Stabilze raw-dylib for non-x86 2022-09-09 15:38:15 -07:00
Michael Howell
624f972358 rustdoc: when removing duplicate names, ignore #[doc(hidden)] items 2022-09-09 15:02:28 -07:00
bors
1d37ed661a 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
2022-09-09 20:43:13 +00:00
Michael Howell
1f8d552d6d rustdoc: avoid cleaning modules with duplicate names 2022-09-09 13:05:08 -07:00
Nicholas Bishop
54d9ba8239 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
2022-09-09 15:26:19 -04:00
Michael Howell
0698ffbdb5 rustdoc: update test cases
Width changed by 2/4 pixels by b273c7502e
2022-09-09 11:48:43 -07:00
Michael Howell
b273c7502e rustdoc: remove unused CSS #search { position: relative }
This was added in 611d0e6cce, to allow its
child `#results` element to be absolutely positioned inside it. The
child stopped being absolute in 8c0469552e.

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`.
2022-09-09 10:35:18 -07:00
Dylan DPC
07a9c10fe6
Rollup merge of #101612 - tmiasko:repeat128, r=lcnr
Fix code generation of `Rvalue::Repeat` with 128 bit values

Closes #101585.
2022-09-09 22:02:19 +05:30
Dylan DPC
ae4973281b
Rollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU
update `ParamKindOrd`

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

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

r? `@BoxyUwU`
2022-09-09 22:02:18 +05:30
Dylan DPC
fcdd5016c5
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.
2022-09-09 22:02:17 +05:30
Dylan DPC
bef48f9314
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
2022-09-09 22:02:16 +05:30
Dylan DPC
d9609c7c26
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
2022-09-09 22:02:16 +05:30
Tim Neumann
76aefbeddb relax msan error-pattern due to LLVM changes 2022-09-09 16:15:08 +00:00
Michael Goulet
022e3fe550 Equate fn outputs when inferring RPITIT hidden types 2022-09-09 16:14:59 +00:00
Oli Scherer
f632dbe46f The <*const T>::guaranteed_* methods now return an option for the unknown case 2022-09-09 15:16:04 +00:00
Yan Chen
052887e4b4 Add inline-llvm option for disabling/enabling LLVM inlining 2022-09-09 08:00:47 -07:00
Tomasz Miąsko
e4d3abfe77 Use memset when repeating 128bit zero value 2022-09-09 15:54:14 +02:00
Tomasz Miąsko
7279106166 Introduce a fallible variant of LLVMConstIntGetZExtValue
which verifies that a constant bit width is within 64 bits or fails.
2022-09-09 15:54:14 +02:00
Guillaume Gomez
2e258cec05
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 e861efd9f9 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
2022-09-09 15:36:38 +02:00
Guillaume Gomez
ff21ccfba1
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.
2022-09-09 15:36:37 +02:00
Guillaume Gomez
3ec332fc82
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.
2022-09-09 15:36:36 +02:00
Guillaume Gomez
6102ff18ae
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
2022-09-09 15:36:35 +02:00
Guillaume Gomez
46dadd65cb
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`
2022-09-09 15:36:34 +02:00
Michael Howell
cbcb74e939 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
  e861efd9f9 to fix the positioning of the code
  tooltip, can now be removed, because example-wrap itself already has
  relative positioning.
2022-09-09 05:56:14 -07:00