Commit graph

150493 commits

Author SHA1 Message Date
bors
e98897e5dc Auto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3
Change vtable memory representation to use tcx allocated allocations.

This fixes https://github.com/rust-lang/rust/issues/86324. However i suspect there's more to change before it can land.

r? `@bjorn3`
cc `@rust-lang/miri`
2021-06-29 15:52:21 +00:00
bors
8971fff984 Auto merge of #86009 - cjgillot:fwarn, r=davidtwco
Make ForceWarn a lint level.

Follow-up to #85788
cc `@rylev`
2021-06-29 13:11:16 +00:00
bors
5d0fae5b66 Auto merge of #86594 - dns2utf8:move_label_to_symbol, r=GuillaumeGomez
rustdoc: Move label to symbol

Implements #86578 depends on #85651

r? `@GuillaumeGomez`

# Screenshot of mobile
![grafik](https://user-images.githubusercontent.com/739070/123267064-1be07f80-d4ec-11eb-8bdb-0b18a41908dc.png)

# Screenshot on desktop
![grafik](https://user-images.githubusercontent.com/739070/123267204-46323d00-d4ec-11eb-97ca-2750421352f4.png)
2021-06-29 10:41:40 +00:00
bors
f12d91f9da Auto merge of #86697 - jackh726:pgo, r=Mark-Simulacrum
Add inflate to pgo
2021-06-29 07:44:20 +00:00
bors
47b2f15bba Auto merge of #86670 - Aaron1011:copy-variance-diag, r=davidtwco
Derive `Copy` for `VarianceDiagInfo`
2021-06-29 05:15:34 +00:00
bors
fecc65a197 Auto merge of #86446 - Smittyvb:rustc_insignificant_dtor-ice, r=Mark-Simulacrum
Don't make `rustc_insignificant_dtor` feature gate

This isn't a feature gate, it's an attribute that is feature gated behind the `rustc_attrs` attribute. Closes #85680.
2021-06-29 02:48:08 +00:00
bors
1ea0e283b4 Auto merge of #86704 - JohnTitor:rollup-lnrxo4i, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #86059 (Add new tool to check HTML)
 - #86529 (Add support for OpenSSL 3.0.0)
 - #86657 (Fix `future_prelude_collision` false positive)
 - #86661 (Editon 2021 enables precise capture)
 - #86671 (Turn non_fmt_panic into a future_incompatible edition lint.)
 - #86673 (Make disjoint_capture_migration an edition lint.)
 - #86678 (Fix garbled suggestion for missing lifetime specifier)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-29 00:18:45 +00:00
Yuki Okushi
a89c6be16e
Rollup merge of #86678 - FabianWolff:issue-86667, r=jackh726
Fix garbled suggestion for missing lifetime specifier

This PR fixes #86667. The suggestion code currently checks whether there is a generic parameter that is not a synthetic `impl Trait` parameter and, if so, suggests to insert a new lifetime `'a` before that generic parameter. However, it does not make sense to insert `'a` in front of an elided lifetime parameter, since these are synthetic as well, which leads to the garbled suggestion in #86667.
2021-06-29 08:46:16 +09:00
Yuki Okushi
af3c1544e2
Rollup merge of #86673 - m-ou-se:disjoint-capture-edition-lint, r=nikomatsakis
Make disjoint_capture_migration an edition lint.

This turns the disjoint capture lint into an edition lint, and changes all the wording to refer to the edition.

This includes the same first commit as https://github.com/rust-lang/rust/pull/86671. See https://github.com/rust-lang/rust/pull/86671.

Fixes most of https://github.com/rust-lang/project-rfc-2229/issues/43#issuecomment-869188197
2021-06-29 08:46:15 +09:00
Yuki Okushi
14f333597e
Rollup merge of #86671 - m-ou-se:non-fmt-panic-future-incompatible, r=nikomatsakis
Turn non_fmt_panic into a future_incompatible edition lint.

This turns the `non_fmt_panic` lint into a future_incompatible edition lint, so it becomes part of the `rust_2021_compatibility` group. See https://github.com/rust-lang/rust/issues/85894.

This lint produces both warnings about semantical changes (e.g. `panic!("{{")`) and things that will become hard errors (e.g. `panic!("{")`). So I added a `explain_reason: false` that supresses the default "this will become a hard error" or "the semantics will change" message, and instead added a note depending on the situation. (cc `@rylev)`

r? `@nikomatsakis`
2021-06-29 08:46:14 +09:00
Yuki Okushi
22f2332b35
Rollup merge of #86661 - sexxi-goose:edition_fix, r=nikomatsakis
Editon 2021 enables precise capture

r? `@nikomatsakis`
2021-06-29 08:46:12 +09:00
Yuki Okushi
5028581a1f
Rollup merge of #86657 - jam1garner:future_prelude_false_positive, r=nikomatsakis
Fix `future_prelude_collision` false positive

Fixes #86633

The lint for checking if method resolution of methods named `try_into` will fail in 2021 edition previously would fire on all inherent methods, however for inherent methods that consume `self`, this takes priority over `TryInto::try_into` due to being inherent, while trait method and methods that take `&self` or `&mut self` don't take priority, and thus aren't affected by this false positive.

This fix is rather simple: simply checking if the inherent method doesn't auto-deref or auto-ref (and thus takes `self`) and if so, prevents the lint from firing.
2021-06-29 08:46:11 +09:00
Yuki Okushi
c9ac096bcd
Rollup merge of #86529 - cuviper:ssl3, r=Mark-Simulacrum
Add support for OpenSSL 3.0.0

This updates the `openssl` and `openssl-sys` crates to support building
the toolchain with system libraries up to OpenSSL 3.0.0. This does not
affect the static version used via `openssl-src` in CI builds.

ref: https://github.com/sfackler/rust-openssl/pull/1264
2021-06-29 08:46:10 +09:00
Yuki Okushi
b5d4343c00
Rollup merge of #86059 - GuillaumeGomez:html-checker2, r=Mark-Simulacrum
Add new tool to check HTML

Re-opening of https://github.com/rust-lang/rust/pull/84480.

r? `@Mark-Simulacrum`
2021-06-29 08:46:09 +09:00
Josh Stone
92eedb202e Bump the workspace dependency for OpenSSL 3 2021-06-28 16:25:44 -07:00
Smitty
7a51cf1186 Panic on trying to find non-feature incompleteness 2021-06-28 18:37:54 -04:00
bors
18db83fde5 Auto merge of #86669 - Smittyvb:satisfy-windows-defender, r=Mark-Simulacrum
Don't run a publically reachable server in tests

This causes Windows Defender's firewall to pop up during tests to ask if I want to allow the test program to access the public Internet, since it was listening on `0.0.0.0` (the test passes regardless of how you respond to the modal, since the firewall only affects traffic outside of the computer, none of which actually happens in the test). The test server doesn't actually need to be publicly reachable, so this makes it so it is only reachable locally, which makes Windows Defender happy.
2021-06-28 21:37:57 +00:00
Stefan Schindler
0f2e137353 Add test for item-table with resize to mobile 2021-06-28 21:46:05 +02:00
jackh726
e55c0ae178 Add inflate to pgo 2021-06-28 15:04:16 -04:00
Smitty
11ebd80fe7 Make incomplete features part of delcaration
This prevents mistakes where the feature is in the list of incomplete
features but not actually a feature by making the incompleteness a part
of the declaration.
2021-06-28 14:39:20 -04:00
Smitty
1abb5bc992 Don't make rustc_insignificant_dtor feature gate
This isn't a feature gate, it's an attribute that is feature gated
behind the `rustc_attrs` attribute. Closes #85680.
2021-06-28 13:14:30 -04:00
bors
a435b49e86 Auto merge of #86690 - JohnTitor:rollup-4ukk4yw, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #86206 (Fix type checking of return expressions outside of function bodies)
 - #86358 (fix pretty print for `loop`)
 - #86568 (Don't dist miri or rust-analyzer on stable or beta.)
 - #86683 (⬆️ rust-analyzer)
 - #86687 (Allow anyone to set `perf-regression` label)
 - #86688 (Add a regression test for issue-65384)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-28 16:48:01 +00:00
Guillaume Gomez
785b705ae4 Only run HTML check on rustdoc generated items 2021-06-28 18:05:34 +02:00
Guillaume Gomez
af37ed738a Install tidy on x86_64-gnu-aux target to run html check 2021-06-28 18:05:34 +02:00
Guillaume Gomez
83a2bc31b9 Add new tool to check HTML:
* Make html-checker run by default on rust compiler docs as well
 * Ensure html-checker is run on CI
 * Lazify tidy binary presence check
2021-06-28 18:05:15 +02:00
Stefan Schindler
a48d9d1c49 Move stab_tags to symbol in tables 2021-06-28 17:41:51 +02:00
Yuki Okushi
c5055b75a2
Rollup merge of #86688 - JohnTitor:test-65384, r=jackh726
Add a regression test for issue-65384

Closes #65384
r? `@jackh726`
2021-06-29 00:27:00 +09:00
Yuki Okushi
98808462c4
Rollup merge of #86687 - JohnTitor:perf-regression-label, r=Mark-Simulacrum
Allow anyone to set `perf-regression` label

The main purpose is to allow the triage bot to set the label: https://github.com/rust-lang/rust/pull/86617#issuecomment-868450443

r? `@Mark-Simulacrum`
2021-06-29 00:26:59 +09:00
Yuki Okushi
6cbe605570
Rollup merge of #86683 - lnicola:rust-analyzer-2021-06-28, r=jonas-schievink
⬆️ rust-analyzer
2021-06-29 00:26:58 +09:00
Yuki Okushi
daa3ceb22b
Rollup merge of #86568 - ehuss:dist-miri-stable, r=Mark-Simulacrum
Don't dist miri or rust-analyzer on stable or beta.

This prevents miri and rust-analyzer from being built for "dist" or "install" on the stable/beta channels. It is a nightly-only tool and should not be included.

Closes #86286
2021-06-29 00:26:57 +09:00
Yuki Okushi
de93434cf0
Rollup merge of #86358 - klensy:pp-loop, r=Mark-Simulacrum
fix pretty print for `loop`
2021-06-29 00:26:55 +09:00
Yuki Okushi
4afdef07d9
Rollup merge of #86206 - FabianWolff:issue-86188, r=Mark-Simulacrum
Fix type checking of return expressions outside of function bodies

This pull request fixes #86188. The problem is that the current code for type-checking `return` expressions stops if the `return` occurs outside of a function body, while the correct behavior is to continue type-checking the return value expression (otherwise an ICE happens later on because variables declared in the return value expression don't have a type).

Also, I have noticed that it is sometimes not obvious why a `return` is outside of a function body; for instance, in the example from #86188 (which currently causes an ICE):
```rust
fn main() {
    [(); return || {
        let tx;
    }]
}
```
I have changed the error message to also explain why the `return` is considered outside of the function body:
```
error[E0572]: return statement outside of function body
 --> ice0.rs:2:10
  |
1 |  / fn main() {
2 |  |     [(); return || {
  |  |__________^
3 | ||         let tx;
4 | ||     }]
  | ||_____^ the return is part of this body...
5 |  | }
  |  |_- ...not the enclosing function body
```
2021-06-29 00:26:54 +09:00
Charles Lew
97772bb1f2 Bless the test suite. 2021-06-28 19:39:48 +08:00
Charles Lew
d3ff497bec Update other codegens to use tcx managed vtable allocations. 2021-06-28 19:39:48 +08:00
bors
17ea490310 Auto merge of #82624 - ojeda:rwlock-example-deadlock, r=JohnTitor
RWLock: Add deadlock example

Suggested in https://github.com/rust-lang/rust/pull/82596 but it was a bit too late.

`@matklad` `@azdavis` `@sfackler`
2021-06-28 09:58:06 +00:00
Yuki Okushi
16201597da
Add a regression test for issue-65384 2021-06-28 18:39:51 +09:00
Yuki Okushi
edf9375c02
Allow anyone to set perf-regression label 2021-06-28 18:17:20 +09:00
bors
451e98e7b0 Auto merge of #86684 - inquisitivecrystal:libs-tracking-issue, r=m-ou-se
Fix typo in libs tracking issue template

Currently, the libs tracking issue template expands FCP as "final commenting period". Everywhere else, including in [the official explanation](https://rust-lang.github.io/rfcs/), it's expanded as "final comment period". That version also sounds a bit better. Accordingly, this PR changes the tracking issue template to use that version.

`@rustbot` label A-meta T-libs-api
r? `@m-ou-se`
2021-06-28 06:24:49 +00:00
Laurențiu Nicola
76a2580a2a ⬆️ rust-analyzer 2021-06-28 09:09:55 +03:00
Aris Merchant
fe54486352 Fix typo in libs tracking issue template 2021-06-27 23:00:26 -07:00
bors
d08a4718a9 Auto merge of #85876 - jeanlucthumm:master, r=GuillaumeGomez
Add `go_to_first` query param to jump to first result

Fixes #84214

Note that while the issue initially wanted to navigate to an entry on exact match, the discussion settled on using a query parameter (`&go_to_first=true`) instead, regardless of exact or partial match.

Demonstration is attached

https://user-images.githubusercontent.com/4934853/120258768-7ff28980-c247-11eb-8c8f-1a2ceb242788.mp4
2021-06-28 03:43:39 +00:00
Aman Arora
10a37bf847 fixup! Editon 2021 enables precise capture 2021-06-27 21:46:55 -04:00
Aman Arora
b89ea96660 Editon 2021 enables precise capture 2021-06-27 21:44:33 -04:00
bors
345530412f Auto merge of #85909 - cjgillot:alloc-kind-query, r=Aaron1011
Make allocator_kind a query.

Part of #85153

r? `@Aaron1011`
2021-06-28 01:20:01 +00:00
bors
3e9d7ecf78 Auto merge of #86589 - JohnTitor:add-triangle-to-summary, r=jsha
Show triangle on the "Details" disclosure element in all cases

Re-submission of #82805, fixes the style issue by applying the same margin as `<p>`.

<details><summary>Before</summary>

![before 1](https://user-images.githubusercontent.com/25030997/123215032-e4c99880-d502-11eb-9ccc-6df58f3a6b0b.png)
![before 2](https://user-images.githubusercontent.com/25030997/123215035-e5622f00-d502-11eb-9275-6c6dfcfdf72e.png)
</details>

<details><summary>After</summary>

![after 1](https://user-images.githubusercontent.com/25030997/123215037-e5fac580-d502-11eb-9b49-c99d1eafb1b4.png)
![after 2](https://user-images.githubusercontent.com/25030997/123215040-e5fac580-d502-11eb-8afc-ab713d3dc658.png)
</details>

r? `@GuillaumeGomez`
2021-06-27 22:57:34 +00:00
Fabian Wolff
f333b4795c Fix garbled suggestion for missing lifetime specifier 2021-06-28 00:56:24 +02:00
bors
e8cb1a4a56 Auto merge of #85359 - lrh2000:reserved-prefixes, r=nikomatsakis
Reserve prefixed identifiers and literals (RFC 3101)

This PR denies any identifiers immediately followed by one of three tokens `"`, `'` or `#`, which is stricter than the requirements of RFC 3101 but may be necessary according to the discussion at [Zulip].

[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/268952-edition-2021/topic/reserved.20prefixes/near/238470099

The tracking issue #84599 says we'll add a feature gate named `reserved_prefixes`, but I don't think I can do this because it is impossible for the lexer to know whether a feature is enabled or not. I guess determining the behavior by the edition information should be enough.

Fixes #84599
2021-06-27 20:33:25 +00:00
bors
a4f832b275 Auto merge of #86445 - sexxi-goose:box_fix, r=nikomatsakis
2229: Capture box completely in move closures

Even if the content from box is used in a sharef-ref context,
we capture the box entirerly.

This is motivated by:
1) We only capture data that is on the stack.
2) Capturing data from within the box might end up moving more data than
the user anticipated.

Closes https://github.com/rust-lang/project-rfc-2229/issues/50

r? `@nikomatsakis`
2021-06-27 18:10:35 +00:00
Jean-Luc Thumm
6c5c0a5853 Add Website features page to rustdoc book 2021-06-27 11:08:23 -07:00
Jean-Luc Thumm
68e3c49cdf Add go_to_first boolean query param to immeidately jump to the first search result 2021-06-27 10:59:53 -07:00