Commit Graph

199688 Commits

Author SHA1 Message Date
Tuna
282b1e4768 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
2022-09-14 18:26:59 -05:00
bors
6f0c4a6c5c 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`
2022-09-11 08:50:35 +00:00
bors
4c3f8eb277 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.
2022-09-11 06:27:29 +00:00
Charles Lew
4e9bcb5d54 Update unit test outputs 2022-09-11 14:21:40 +08:00
Charles Lew
0f367a9be8 Use current rustc version. 2022-09-11 14:04:18 +08:00
Andrew Cann
9cd008f514 fix tests after rebase 2022-09-11 14:04:18 +08:00
Andrew Cann
d9a17229dc test async diagnostics for feature(generator_clone) 2022-09-11 14:04:17 +08:00
Andrew Cann
62112f4dc1 minor fixups as per PR feedback 2022-09-11 14:04:17 +08:00
Andrew Cann
543023c249 Add some comments to generator clone shim code 2022-09-11 14:04:17 +08:00
Andrew Cann
1bc9453aa8 Add tracking issue number to feature(generator_clone) 2022-09-11 14:04:17 +08:00
Andrew Cann
fa6dbcf20d Add feature gate tests for generator_clone 2022-09-11 14:04:16 +08:00
Andrew Cann
22f4bbb20f Apply formatting fixes 2022-09-11 14:04:16 +08:00
Andrew Cann
8aa30dd3cb move generator_clone feature definition
Move it to the list of features with no tracking issue, since it has no
tracking issue.
2022-09-11 14:04:16 +08:00
Andrew Cann
c1f1bc6e8f fix GeneratorWitness: Clone check 2022-09-11 14:04:16 +08:00
Andrew Cann
a5cb3cca5e loosen restriction on when GeneratorWitness: Clone 2022-09-11 14:04:15 +08:00
Andrew Cann
0228c073e0 add generator_clone feature gate 2022-09-11 14:04:12 +08:00
Andrew Cann
2c0bc9444e implement Copy/Clone for generators 2022-09-11 13:50:35 +08:00
bors
56b625be68 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`
2022-09-11 04:07:17 +00:00
Predrag Gruevski
a1fa958cf3
Add @obi1kenobi to the cc list for rustdoc-json-types 2022-09-10 22:04:57 -04:00
bors
abd4d2ef0d Auto merge of #101643 - ChrisDenton:alloc-link-kernel32, r=thomcc
Explicitly link kernel32.lib from alloc
2022-09-11 01:44:09 +00:00
bors
781ef3e995 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`
2022-09-10 23:13:23 +00:00
bors
2287107588 Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
Remove ReEmpty

r? rust-lang/types
2022-09-10 20:54:01 +00:00
joboet
81b11ed698
std: optimize thread parking on NetBSD 2022-09-10 20:03:15 +02:00
bors
4a6ac3c225 Auto merge of #101647 - crlf0710:test_for_99551, r=bjorn3
Fix LLVM IR type mismatch reported in #99551

Closes #99551 .
2022-09-10 17:39:16 +00:00
Charles Lew
1cbbd2aa61 Fix pointer value punning.
Seems this doesn't trigger error on LLVM 15, but let's fix it for better compatibility.
2022-09-10 23:50:20 +08:00
bors
1463688700 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
2022-09-10 14:48:34 +00:00
Dylan DPC
783561029c
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`
2022-09-10 18:56:11 +05:30
Dylan DPC
b0455e9ab4
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`
2022-09-10 18:56:10 +05:30
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