]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRemove "delete" doc aliases
Amanieu d'Antras [Wed, 30 Jun 2021 19:25:57 +0000 (20:25 +0100)]
Remove "delete" doc aliases

3 years agoRemove alloc/malloc/calloc/realloc doc aliases
Amanieu d'Antras [Wed, 30 Jun 2021 18:59:39 +0000 (19:59 +0100)]
Remove alloc/malloc/calloc/realloc doc aliases

3 years agoAuto merge of #86695 - sexxi-goose:closure_size, r=nikomatsakis
bors [Wed, 30 Jun 2021 13:42:50 +0000 (13:42 +0000)]
Auto merge of #86695 - sexxi-goose:closure_size, r=nikomatsakis

Introduce -Zprofile-closures to evaluate the impact of 2229

This creates a CSV with name "closure_profile_XXXXX.csv", where the
variable part is the process id of the compiler.

To profile a cargo project you can run one of the following depending on
if you're compiling a library or a binary:

```
cargo +nightly rustc --lib -- -Zprofile-closures
cargo +nightly rustc --bin {binary_name} -- -Zprofile-closures
```

r? `@nikomatsakis`

3 years agoAuto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157
bors [Wed, 30 Jun 2021 10:54:08 +0000 (10:54 +0000)]
Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157

Fix boldness (put it back where needed)

I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).

3 years agoAuto merge of #86739 - RalfJung:miri, r=RalfJung
bors [Wed, 30 Jun 2021 07:28:42 +0000 (07:28 +0000)]
Auto merge of #86739 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/86723
Cc `@rust-lang/miri` r? `@ghost`

3 years agoupdate Miri
Ralf Jung [Wed, 30 Jun 2021 07:21:20 +0000 (09:21 +0200)]
update Miri

3 years agoAuto merge of #86689 - rylev:future-compat-lint-group, r=nikomatsakis
bors [Wed, 30 Jun 2021 05:02:01 +0000 (05:02 +0000)]
Auto merge of #86689 - rylev:future-compat-lint-group, r=nikomatsakis

Only include lint in future_incompatible lint group if not an edition lint

A follow up to #86330 - this only includes lints annotated with `FutureIncompatibleInfo` in the `future_incompatibile` lint group if the future compatibility is not tied to an edition.

We probably want to rename `FutureIncompatibleInfo` to something else since this type is now used to indicate future breakages of all kinds (even those that happen in editions). I'd prefer to do that in a separate PR though.

r? `@nikomatsakis`

3 years agoAuto merge of #86724 - cuviper:indexmap-1.7, r=Mark-Simulacrum
bors [Wed, 30 Jun 2021 02:20:50 +0000 (02:20 +0000)]
Auto merge of #86724 - cuviper:indexmap-1.7, r=Mark-Simulacrum

Upgrade to indexmap 1.7, using hashbrown 0.11

3 years agoAuto merge of #86522 - JohnTitor:move-ui-tests, r=petrochenkov
bors [Tue, 29 Jun 2021 23:40:00 +0000 (23:40 +0000)]
Auto merge of #86522 - JohnTitor:move-ui-tests, r=petrochenkov

Move some UI tests to more suitable subdirs

cc #73494
The classified result is here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427

- issues/issue-27060.rs: misclassified, should be packed.
- issues/issue-45157.rs: moved to nll.
- issues/issue-69532.rs: ~~couldn't figured out the best place, placed a new `llvm` dir~~ moved to consts.
- fsu-moves-and-copies.rs: moved to borrowck.
- issues/issue-36638.rs: misclassified, moved to keyword.
- issues/issue-48636.rs: moved to parser.
- issues/issue-37655.rs: I'm not sure but associated-types shouldn't the best, moved to coercion but region may be better.
- issues/issue-20005.rs: moved to associated-types.
- issues/issue-82869.rs: moved to asm.
- issues/issue-24535-allow-mutable-borrow-in-match-guard.rs: moved to nll.
- issues/issue-52169.rs: moved to macros.
- test-passed.rs: moved to test-attrs along with `test-` prefixed tests.
  - test-cfg.rs: moved to conditional-compilation.
- non-integer-atomic.rs: moved to intrinsics.
- issues/issue-54521-2.rs: moved to parser.
- issues/issue-17756.rs: moved to consts.
- conversion-methods.rs: ~~moved to suggestions~~ moved to typeck.

r? `@petrochenkov`

3 years agoMove some UI tests to more suitable subdirs
Yuki Okushi [Mon, 21 Jun 2021 20:29:18 +0000 (05:29 +0900)]
Move some UI tests to more suitable subdirs

3 years agoAuto merge of #86725 - JohnTitor:normalizecss-8, r=GuillaumeGomez
bors [Tue, 29 Jun 2021 20:59:14 +0000 (20:59 +0000)]
Auto merge of #86725 - JohnTitor:normalizecss-8, r=GuillaumeGomez

Upgrade normalize.css to v8.0.1

Fixes #86629, this addresses #82548 and #82542 with tweaks. I expect that this changes the style *slightly* but shouldn't have any major changes.
Here's some changes I observed, I'd say they all are an improvement.

<details>
<summary>Before</summary>

![before 1](https://user-images.githubusercontent.com/25030997/123854746-0fc84800-d95a-11eb-8484-ea86dfe0ae14.png)
![before 2](https://user-images.githubusercontent.com/25030997/123854754-135bcf00-d95a-11eb-8cca-f49994629e08.png)

</details>

<details>
<summary>After</summary>

![after 1](https://user-images.githubusercontent.com/25030997/123854809-21115480-d95a-11eb-9dd2-0d3b9ca45edd.png)
![after 2](https://user-images.githubusercontent.com/25030997/123854818-22428180-d95a-11eb-83aa-fb5a698124f9.png)

</details>

r? `@jsha`

3 years agoFix some style regressions due to normalize.css 8
Yuki Okushi [Tue, 29 Jun 2021 19:13:46 +0000 (04:13 +0900)]
Fix some style regressions due to normalize.css 8

3 years agoUpgrade normalize.css to v8.0.1
Yuki Okushi [Tue, 29 Jun 2021 19:13:16 +0000 (04:13 +0900)]
Upgrade normalize.css to v8.0.1

3 years agoUpgrade to indexmap 1.7, using hashbrown 0.11
Josh Stone [Tue, 29 Jun 2021 18:38:16 +0000 (11:38 -0700)]
Upgrade to indexmap 1.7, using hashbrown 0.11

3 years agoAuto merge of #86603 - Mark-Simulacrum:stage-step, r=pietroalbini
bors [Tue, 29 Jun 2021 18:33:13 +0000 (18:33 +0000)]
Auto merge of #86603 - Mark-Simulacrum:stage-step, r=pietroalbini

Update to new bootstrap compiler

r? `@pietroalbini`

3 years agoAuto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3
bors [Tue, 29 Jun 2021 15:52:21 +0000 (15:52 +0000)]
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`

3 years agoAuto merge of #86009 - cjgillot:fwarn, r=davidtwco
bors [Tue, 29 Jun 2021 13:11:16 +0000 (13:11 +0000)]
Auto merge of #86009 - cjgillot:fwarn, r=davidtwco

Make ForceWarn a lint level.

Follow-up to #85788
cc `@rylev`

3 years agoAuto merge of #86594 - dns2utf8:move_label_to_symbol, r=GuillaumeGomez
bors [Tue, 29 Jun 2021 10:41:40 +0000 (10:41 +0000)]
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)

3 years agoAuto merge of #86697 - jackh726:pgo, r=Mark-Simulacrum
bors [Tue, 29 Jun 2021 07:44:20 +0000 (07:44 +0000)]
Auto merge of #86697 - jackh726:pgo, r=Mark-Simulacrum

Add inflate to pgo

3 years agoAuto merge of #86670 - Aaron1011:copy-variance-diag, r=davidtwco
bors [Tue, 29 Jun 2021 05:15:34 +0000 (05:15 +0000)]
Auto merge of #86670 - Aaron1011:copy-variance-diag, r=davidtwco

Derive `Copy` for `VarianceDiagInfo`

3 years agoAuto merge of #86446 - Smittyvb:rustc_insignificant_dtor-ice, r=Mark-Simulacrum
bors [Tue, 29 Jun 2021 02:48:08 +0000 (02:48 +0000)]
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.

3 years agoAuto merge of #86704 - JohnTitor:rollup-lnrxo4i, r=JohnTitor
bors [Tue, 29 Jun 2021 00:18:45 +0000 (00:18 +0000)]
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

3 years agoRollup merge of #86678 - FabianWolff:issue-86667, r=jackh726
Yuki Okushi [Mon, 28 Jun 2021 23:46:16 +0000 (08:46 +0900)]
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.

3 years agoRollup merge of #86673 - m-ou-se:disjoint-capture-edition-lint, r=nikomatsakis
Yuki Okushi [Mon, 28 Jun 2021 23:46:15 +0000 (08:46 +0900)]
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

3 years agoRollup merge of #86671 - m-ou-se:non-fmt-panic-future-incompatible, r=nikomatsakis
Yuki Okushi [Mon, 28 Jun 2021 23:46:14 +0000 (08:46 +0900)]
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`

3 years agoRollup merge of #86661 - sexxi-goose:edition_fix, r=nikomatsakis
Yuki Okushi [Mon, 28 Jun 2021 23:46:12 +0000 (08:46 +0900)]
Rollup merge of #86661 - sexxi-goose:edition_fix, r=nikomatsakis

Editon 2021 enables precise capture

r? `@nikomatsakis`

3 years agoRollup merge of #86657 - jam1garner:future_prelude_false_positive, r=nikomatsakis
Yuki Okushi [Mon, 28 Jun 2021 23:46:11 +0000 (08:46 +0900)]
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.

3 years agoRollup merge of #86529 - cuviper:ssl3, r=Mark-Simulacrum
Yuki Okushi [Mon, 28 Jun 2021 23:46:10 +0000 (08:46 +0900)]
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

3 years agoRollup merge of #86059 - GuillaumeGomez:html-checker2, r=Mark-Simulacrum
Yuki Okushi [Mon, 28 Jun 2021 23:46:09 +0000 (08:46 +0900)]
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`

3 years agoBump the workspace dependency for OpenSSL 3
Josh Stone [Mon, 28 Jun 2021 23:25:44 +0000 (16:25 -0700)]
Bump the workspace dependency for OpenSSL 3

3 years agoPanic on trying to find non-feature incompleteness
Smitty [Mon, 28 Jun 2021 22:37:54 +0000 (18:37 -0400)]
Panic on trying to find non-feature incompleteness

3 years agoAuto merge of #86669 - Smittyvb:satisfy-windows-defender, r=Mark-Simulacrum
bors [Mon, 28 Jun 2021 21:37:57 +0000 (21:37 +0000)]
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.

3 years agoAdd test for item-table with resize to mobile
Stefan Schindler [Thu, 24 Jun 2021 12:30:01 +0000 (14:30 +0200)]
Add test for item-table with resize to mobile

3 years agoAdd inflate to pgo
jackh726 [Mon, 28 Jun 2021 19:04:16 +0000 (15:04 -0400)]
Add inflate to pgo

3 years agoMake incomplete features part of delcaration
Smitty [Mon, 28 Jun 2021 18:39:20 +0000 (14:39 -0400)]
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.

3 years agoIntroduce -Zprofile-closures to evaluate the impact of 2229
Aman Arora [Wed, 5 May 2021 19:57:08 +0000 (15:57 -0400)]
Introduce -Zprofile-closures to evaluate the impact of 2229

This creates a CSV with name "closure_profile_XXXXX.csv", where the
variable part is the process id of the compiler.

To profile a cargo project you can run one of the following depending on
if you're compiling a library or a binary:

```
cargo +stage1 rustc --lib -- -Zprofile-closures
cargo +stage1 rustc --bin -- -Zprofile-closures
```

3 years agoDon't make `rustc_insignificant_dtor` feature gate
Smitty [Fri, 18 Jun 2021 20:51:10 +0000 (16:51 -0400)]
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.

3 years agoAuto merge of #86690 - JohnTitor:rollup-4ukk4yw, r=JohnTitor
bors [Mon, 28 Jun 2021 16:48:01 +0000 (16:48 +0000)]
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 (:arrow_up: 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

3 years agoOnly run HTML check on rustdoc generated items
Guillaume Gomez [Thu, 3 Jun 2021 17:57:49 +0000 (19:57 +0200)]
Only run HTML check on rustdoc generated items

3 years agoInstall tidy on x86_64-gnu-aux target to run html check
Guillaume Gomez [Sat, 24 Apr 2021 15:25:45 +0000 (17:25 +0200)]
Install tidy on x86_64-gnu-aux target to run html check

3 years agoAdd new tool to check HTML:
Guillaume Gomez [Fri, 23 Apr 2021 14:43:18 +0000 (16:43 +0200)]
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

3 years agoAdd comment for future_incompatible lint group
Ryan Levick [Mon, 28 Jun 2021 15:42:27 +0000 (17:42 +0200)]
Add comment for future_incompatible lint group

3 years agoMove stab_tags to symbol in tables
Stefan Schindler [Wed, 23 Jun 2021 18:02:00 +0000 (20:02 +0200)]
Move stab_tags to symbol in tables

3 years agoUpdate to new bootstrap compiler
Mark Rousskov [Thu, 24 Jun 2021 16:47:33 +0000 (12:47 -0400)]
Update to new bootstrap compiler

3 years agoRollup merge of #86688 - JohnTitor:test-65384, r=jackh726
Yuki Okushi [Mon, 28 Jun 2021 15:27:00 +0000 (00:27 +0900)]
Rollup merge of #86688 - JohnTitor:test-65384, r=jackh726

Add a regression test for issue-65384

Closes #65384
r? `@jackh726`

3 years agoRollup merge of #86687 - JohnTitor:perf-regression-label, r=Mark-Simulacrum
Yuki Okushi [Mon, 28 Jun 2021 15:26:59 +0000 (00:26 +0900)]
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`

3 years agoRollup merge of #86683 - lnicola:rust-analyzer-2021-06-28, r=jonas-schievink
Yuki Okushi [Mon, 28 Jun 2021 15:26:58 +0000 (00:26 +0900)]
Rollup merge of #86683 - lnicola:rust-analyzer-2021-06-28, r=jonas-schievink

:arrow_up: rust-analyzer

3 years agoRollup merge of #86568 - ehuss:dist-miri-stable, r=Mark-Simulacrum
Yuki Okushi [Mon, 28 Jun 2021 15:26:57 +0000 (00:26 +0900)]
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

3 years agoRollup merge of #86358 - klensy:pp-loop, r=Mark-Simulacrum
Yuki Okushi [Mon, 28 Jun 2021 15:26:55 +0000 (00:26 +0900)]
Rollup merge of #86358 - klensy:pp-loop, r=Mark-Simulacrum

fix pretty print for `loop`

3 years agoRollup merge of #86206 - FabianWolff:issue-86188, r=Mark-Simulacrum
Yuki Okushi [Mon, 28 Jun 2021 15:26:54 +0000 (00:26 +0900)]
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
```

3 years agoOnly include lint in future_incompatible lint group if not an edition lint
Ryan Levick [Thu, 24 Jun 2021 14:29:03 +0000 (16:29 +0200)]
Only include lint in future_incompatible lint group if not an edition lint

3 years agoBless the test suite.
Charles Lew [Mon, 28 Jun 2021 04:39:42 +0000 (12:39 +0800)]
Bless the test suite.

3 years agoUpdate other codegens to use tcx managed vtable allocations.
Charles Lew [Sun, 20 Jun 2021 09:43:25 +0000 (17:43 +0800)]
Update other codegens to use tcx managed vtable allocations.

3 years agoAuto merge of #82624 - ojeda:rwlock-example-deadlock, r=JohnTitor
bors [Mon, 28 Jun 2021 09:58:06 +0000 (09:58 +0000)]
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`

3 years agoAdd a regression test for issue-65384
Yuki Okushi [Mon, 28 Jun 2021 09:39:51 +0000 (18:39 +0900)]
Add a regression test for issue-65384

3 years agoAllow anyone to set `perf-regression` label
Yuki Okushi [Mon, 28 Jun 2021 09:15:26 +0000 (18:15 +0900)]
Allow anyone to set `perf-regression` label

3 years agoAuto merge of #86684 - inquisitivecrystal:libs-tracking-issue, r=m-ou-se
bors [Mon, 28 Jun 2021 06:24:49 +0000 (06:24 +0000)]
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`

3 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Mon, 28 Jun 2021 06:09:55 +0000 (09:09 +0300)]
:arrow_up: rust-analyzer

3 years agoFix typo in libs tracking issue template
Aris Merchant [Mon, 28 Jun 2021 06:00:26 +0000 (23:00 -0700)]
Fix typo in libs tracking issue template

3 years agoAuto merge of #85876 - jeanlucthumm:master, r=GuillaumeGomez
bors [Mon, 28 Jun 2021 03:43:39 +0000 (03:43 +0000)]
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

3 years agofixup! Editon 2021 enables precise capture
Aman Arora [Mon, 28 Jun 2021 01:28:31 +0000 (21:28 -0400)]
fixup! Editon 2021 enables precise capture

3 years agoEditon 2021 enables precise capture
Aman Arora [Sun, 27 Jun 2021 06:22:46 +0000 (02:22 -0400)]
Editon 2021 enables precise capture

3 years agoAuto merge of #85909 - cjgillot:alloc-kind-query, r=Aaron1011
bors [Mon, 28 Jun 2021 01:20:01 +0000 (01:20 +0000)]
Auto merge of #85909 - cjgillot:alloc-kind-query, r=Aaron1011

Make allocator_kind a query.

Part of #85153

r? `@Aaron1011`

3 years agoAuto merge of #86589 - JohnTitor:add-triangle-to-summary, r=jsha
bors [Sun, 27 Jun 2021 22:57:34 +0000 (22:57 +0000)]
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`

3 years agoFix garbled suggestion for missing lifetime specifier
Fabian Wolff [Sun, 27 Jun 2021 22:56:24 +0000 (00:56 +0200)]
Fix garbled suggestion for missing lifetime specifier

3 years agoAuto merge of #85359 - lrh2000:reserved-prefixes, r=nikomatsakis
bors [Sun, 27 Jun 2021 20:33:25 +0000 (20:33 +0000)]
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

3 years agoAuto merge of #86445 - sexxi-goose:box_fix, r=nikomatsakis
bors [Sun, 27 Jun 2021 18:10:35 +0000 (18:10 +0000)]
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`

3 years agoAdd Website features page to rustdoc book
Jean-Luc Thumm [Tue, 22 Jun 2021 22:40:37 +0000 (15:40 -0700)]
Add Website features page to rustdoc book

3 years agoAdd go_to_first boolean query param to immeidately jump to the first search result
Jean-Luc Thumm [Tue, 1 Jun 2021 02:20:41 +0000 (19:20 -0700)]
Add go_to_first boolean query param to immeidately jump to the first search result

3 years agoMake disjoint_capture_migration an edition lint.
Mara Bos [Sun, 27 Jun 2021 16:54:48 +0000 (16:54 +0000)]
Make disjoint_capture_migration an edition lint.

3 years agoAuto merge of #86655 - jonas-schievink:const-arguments-as-str, r=kennytm
bors [Sun, 27 Jun 2021 15:45:29 +0000 (15:45 +0000)]
Auto merge of #86655 - jonas-schievink:const-arguments-as-str, r=kennytm

Make `fmt::Arguments::as_str` unstably const

Motivation: mostly to move "panic!() in const contexts" forward, making use of `as_str` was mentioned in https://github.com/rust-lang/rust/issues/85194#issuecomment-852345377 and seems like the simplest way forward.

3 years agoAdd `explain_reason: false` in future_incompatible.
Mara Bos [Sun, 27 Jun 2021 14:45:54 +0000 (14:45 +0000)]
Add `explain_reason: false` in future_incompatible.

This allows supressing the default warning message for future
incompatible ints, for lints that already provide a more detailed
warning.

3 years agoTurn non_fmt_panic into a future_incompatible edition lint.
Mara Bos [Sun, 27 Jun 2021 14:47:26 +0000 (14:47 +0000)]
Turn non_fmt_panic into a future_incompatible edition lint.

3 years agoAdd `explain_reason: false` in future_incompatible.
Mara Bos [Sun, 27 Jun 2021 14:45:54 +0000 (14:45 +0000)]
Add `explain_reason: false` in future_incompatible.

This allows supressing the default warning message for future
incompatible ints, for lints that already provide a more detailed
warning.

3 years agoDerive `Copy` for `VarianceDiagInfo`
Aaron Hill [Sun, 27 Jun 2021 14:28:37 +0000 (09:28 -0500)]
Derive `Copy` for `VarianceDiagInfo`

3 years agoDon't run a publically reachable server in tests
Smitty [Sun, 27 Jun 2021 13:53:27 +0000 (09:53 -0400)]
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 server doesn't actually need to be
publically reachable, so this makes it so it is only reachable locally,
which makes Windows Defender happy.

3 years agoAuto merge of #86295 - usbalbin:revert_revert_of_constness, r=RalfJung
bors [Sun, 27 Jun 2021 13:19:48 +0000 (13:19 +0000)]
Auto merge of #86295 - usbalbin:revert_revert_of_constness, r=RalfJung

Revert revert of constness in #86003

Re-constify `mem::swap`, `mem::replace`, `ptr::write` which were marked as not `const` in #86003

Once the checks pass, this should solve #86236

3 years agoUpdate and bless tests for const read out of bounds
Albin Hedman [Sun, 27 Jun 2021 12:24:49 +0000 (14:24 +0200)]
Update and bless tests for const read out of bounds

3 years agoUpdate and bless tests for copy intrinsic
Albin Hedman [Sun, 27 Jun 2021 11:48:01 +0000 (13:48 +0200)]
Update and bless tests for copy intrinsic

3 years agoChange miri to use tcx allocated allocations.
Charles Lew [Sun, 20 Jun 2021 04:34:26 +0000 (12:34 +0800)]
Change miri to use tcx allocated allocations.

3 years agoFix the test copy-intrinsic
Albin Hedman [Tue, 15 Jun 2021 17:22:31 +0000 (19:22 +0200)]
Fix the test copy-intrinsic

3 years agoBring back tests removed in 'Revert PRs 81238 and 82967 (which made copy and copy_non...
Albin Hedman [Tue, 15 Jun 2021 14:47:31 +0000 (16:47 +0200)]
Bring back tests removed in 'Revert PRs 81238 and 82967 (which made copy and copy_nonoverlapping' 5f6016f1259142de7ab1f186f412fa3ca26607a8

3 years agoBless out_of_bounds_read test
Albin Hedman [Mon, 14 Jun 2021 18:47:54 +0000 (20:47 +0200)]
Bless out_of_bounds_read test

3 years agoAdd reference to tracking issue #86302 for const_ptr_write
Albin Hedman [Mon, 14 Jun 2021 17:58:34 +0000 (19:58 +0200)]
Add reference to tracking issue #86302 for const_ptr_write

3 years agoAdd reference to issue for const_intrinsic_copy in ptr::write
Albin Hedman [Mon, 14 Jun 2021 17:39:02 +0000 (19:39 +0200)]
Add reference to issue for const_intrinsic_copy in ptr::write

3 years agoRevert "With the revert of PR 83091, `swap` is not a `const fn` anymore."
Albin Hedman [Mon, 14 Jun 2021 15:35:29 +0000 (17:35 +0200)]
Revert "With the revert of PR 83091, `swap` is not a `const fn` anymore."

This reverts commit 34deda3cc250c2607a68cda75fe256f43b110fdc.

3 years agoRevert "Remove tests that were also added in PR 79684."
Albin Hedman [Mon, 14 Jun 2021 15:32:51 +0000 (17:32 +0200)]
Revert "Remove tests that were also added in PR 79684."

This reverts commit e118a2cbf1e590cb5a7586ad01c6c3431c2b4f48.

3 years agoRevert "Revert tests added by PR 81167."
Albin Hedman [Mon, 14 Jun 2021 15:30:12 +0000 (17:30 +0200)]
Revert "Revert tests added by PR 81167."

This reverts commit cebfcd3256a6ec8655f0d9f45426d6f42a92da9c.

3 years agoRevert "Revert effects of PRs 81167 and 83091."
Albin Hedman [Mon, 14 Jun 2021 15:29:22 +0000 (17:29 +0200)]
Revert "Revert effects of PRs 81167 and 83091."

This reverts commit 9d96b0ed8c0f37bc09e737e1ab5880e8f5dd43f2.

3 years agoAdd FIXME comment
Yuki Okushi [Sun, 27 Jun 2021 07:18:52 +0000 (16:18 +0900)]
Add FIXME comment

3 years agoAuto merge of #85448 - nanguye2496:nanguye2496/debuginfo_tests, r=Mark-Simulacrum
bors [Sun, 27 Jun 2021 06:58:07 +0000 (06:58 +0000)]
Auto merge of #85448 - nanguye2496:nanguye2496/debuginfo_tests, r=Mark-Simulacrum

Add debug info tests for range, fix-sized array, and cell types

This PR add several debug info tests to guarantee that the displays of fixed sized arrays, range types, cell types, threads, locks, and mutexes in CDB are correct.

It also updates CDB tests for slices in pretty-std.rs after string visualization in WinDbg is fixed by this PR: #81898.

3 years agoFix `future_prelude_collision` false positive
jam1garner [Sun, 27 Jun 2021 04:28:07 +0000 (00:28 -0400)]
Fix `future_prelude_collision` false positive

3 years agoMake `fmt::Arguments::as_str` unstably const
Jonas Schievink [Sun, 27 Jun 2021 01:54:06 +0000 (03:54 +0200)]
Make `fmt::Arguments::as_str` unstably const

3 years agoAuto merge of #86645 - FabianWolff:issue-82328, r=LeSeulArtichaut
bors [Sun, 27 Jun 2021 00:15:49 +0000 (00:15 +0000)]
Auto merge of #86645 - FabianWolff:issue-82328, r=LeSeulArtichaut

Fix ICE with `-Zunpretty=hir,typed`

This PR fixes #82328. The `-Zunpretty=hir,typed` pretty-printer maintains an `Option` with type-checking results and sets the `Option` to `Some` when entering a body. However, this leads to an ICE if an expression occurs in a function signature (i.e. outside of a body), such as `128` in
```rust
fn foo(-128..=127: i8) {}
```
This PR fixes the ICE by checking (if necessary) whether the expression's owner has a body, and retrieving type-checking results for that on the fly.

3 years agoUpdate reserved prefixes test for new edition lint wording.
Mara Bos [Sat, 26 Jun 2021 20:49:29 +0000 (20:49 +0000)]
Update reserved prefixes test for new edition lint wording.

3 years agoReorder some lines in `unpretty-expr-fn-arg.rs`
Fabian Wolff [Sat, 26 Jun 2021 20:43:27 +0000 (22:43 +0200)]
Reorder some lines in `unpretty-expr-fn-arg.rs`

3 years agoUse `Option::map()` instead of `if let`
Fabian Wolff [Sat, 26 Jun 2021 20:26:26 +0000 (22:26 +0200)]
Use `Option::map()` instead of `if let`

3 years agoAdd tests to ensure the font-weight is the correct one
Guillaume Gomez [Sat, 26 Jun 2021 19:38:24 +0000 (21:38 +0200)]
Add tests to ensure the font-weight is the correct one

3 years agoRemove erroneously created file
Guillaume Gomez [Sat, 26 Jun 2021 19:38:04 +0000 (21:38 +0200)]
Remove erroneously created file

3 years agoAuto merge of #86267 - ZuseZ4:master, r=nagisa
bors [Sat, 26 Jun 2021 19:20:41 +0000 (19:20 +0000)]
Auto merge of #86267 - ZuseZ4:master, r=nagisa

Allow loading of llvm plugins on nightly

Based on a discussion in  #82734 / with `@wsmoses.`
Mainly moves [this](https://github.com/wsmoses/rust/commit/0149bc4e7e596005c665b132877abebe5258a0f6) behind a -Z flag, so it can only be used on nightly,
as requested by `@nagisa` in https://github.com/rust-lang/rust/issues/82734#issuecomment-835863940

This change allows loading of llvm plugins like Enzyme.
Right now it also requires a shared library LLVM build of rustc for symbol resolution.

```rust
// test.rs
extern { fn __enzyme_autodiff(_: usize, ...) -> f64; }

fn square(x : f64) -> f64 {
   return x * x;
}

fn main() {
   unsafe {
      println!("Hello, world {} {}!", square(3.0), __enzyme_autodiff(square as usize, 3.0));
   }
}
```
```
./rustc test.rs -Z llvm-plugins="./LLVMEnzyme-12.so" -C passes="enzyme"
./test
Hello, world 9 6!
```

I will try to figure out how to simplify the usage and get this into stable in a later iteration,
but having this on nightly will already help testing further steps.