Commit graph

150782 commits

Author SHA1 Message Date
Simonas Kazlauskas
9b67cba4f6 Add support for leaf fn frame pointer elimination
This PR adds ability for the target specifications to specify frame
pointer emission type that's not just “always” or “whatever cg decides”.

In particular there's a new mode that allows omission of the frame
pointer for leaf functions (those that don't call any other functions).

We then set this new mode for Aarch64-based Apple targets.

Fixes #86196
2021-06-30 19:45:17 +03:00
Fabian Wolff
0c267830d5 Match on hir::TraitFn::Provided instead of using maybe_body_owned_by 2021-06-30 18:27:07 +02:00
Igor Aleksanov
018be41dee Implement 'disallowed_script_idents' lint 2021-06-30 19:06:33 +03:00
Deadbeef
c424510746
Add tests for cross-crate usage of impl const 2021-06-30 23:57:17 +08:00
Deadbeef
3b9453bfe2
use is_const_fn_raw when encoding constness
this properly encodes cross-crate constness data.
2021-06-30 23:56:43 +08:00
bors
3525a6b61a Auto merge of #7390 - popzxc:issue-7331, r=flip1995
Improve lint message for match-same-arms lint

fixes #7331

Follow-up to #7377

This PR improves the lint message for `match-same-arms` lint and adds `todo!(..)`  example to the lint docs.

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: None
2021-06-30 15:12:55 +00:00
bors
868c702d0c 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`
2021-06-30 13:42:50 +00:00
Guillaume Gomez
855923c895 Add test to ensure that the typed queries are not including other types 2021-06-30 14:20:17 +02:00
Guillaume Gomez
7b62d28cf2 Enforce search typed queries 2021-06-30 14:11:09 +02:00
Fabian Wolff
11fd8579e4 Emit explanatory note for functions in trait and impl items as well 2021-06-30 13:56:26 +02:00
bors
5d34076975 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).
2021-06-30 10:54:08 +00:00
bors
7ede6e2a23 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`
2021-06-30 07:28:42 +00:00
Ralf Jung
80fa596145 update Miri 2021-06-30 09:21:20 +02:00
1000teslas
fe822fe64d copy rust-lld as ld in dist 2021-06-30 16:30:40 +10:00
bors
51fd129ac1 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`
2021-06-30 05:02:01 +00:00
Joshua Nelson
81f3ab6bca Use a macro for documenting rustdoc 2021-06-29 23:05:02 -04:00
bors
9af4bdeab0 Auto merge of #86724 - cuviper:indexmap-1.7, r=Mark-Simulacrum
Upgrade to indexmap 1.7, using hashbrown 0.11
2021-06-30 02:20:50 +00:00
bors
0ce21126b2 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`
2021-06-29 23:40:00 +00:00
Yuki Okushi
2c6268678d
Move some UI tests to more suitable subdirs 2021-06-30 06:41:10 +09:00
bors
6d820866a2 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`
2021-06-29 20:59:14 +00:00
Fabian Wolff
2586e962e0 Check node kind to avoid ICE in check_expr_return() 2021-06-29 22:20:06 +02:00
Yuki Okushi
510107815f
Fix some style regressions due to normalize.css 8 2021-06-30 04:13:46 +09:00
Yuki Okushi
66430652d1
Upgrade normalize.css to v8.0.1 2021-06-30 04:13:16 +09:00
Josh Stone
ae9713a399 Upgrade to indexmap 1.7, using hashbrown 0.11 2021-06-29 11:38:16 -07:00
bors
6e0b554619 Auto merge of #86603 - Mark-Simulacrum:stage-step, r=pietroalbini
Update to new bootstrap compiler

r? `@pietroalbini`
2021-06-29 18:33:13 +00:00
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
Ian Wahbe
e77acf7d27 Add non-mutable methods to Cursor 2021-06-29 15:35:14 +02:00
Ian Wahbe
a981be75cc add head/tail methods to linked list mutable cursor 2021-06-29 15:24:01 +02:00
bors
fbd77ef5d3 Auto merge of #7411 - camsteffen:use-self-visitor, r=flip1995
Simplify use_self impl

changelog: none

Mainly to remove an extra visit and simplify the "in body?" logic.
2021-06-29 13:23:04 +00:00
Cameron Steffen
bae76f9c17 Remove a visitor from use_self 2021-06-29 08:17:23 -05:00
Cameron Steffen
6e801e251f Use type_of for impl self type 2021-06-29 08:15:45 -05:00
Cameron Steffen
4913d82175 Simplify in impl check 2021-06-29 08:14:21 -05:00
Cameron Steffen
8827e96303 Make ItemKind check dry 2021-06-29 08:14:21 -05: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
95c2ab75db Auto merge of #7405 - jyn514:fix-stable, r=camsteffen
Stabilize `cargo clippy --fix`

This has been unstable since it was first introduced in
https://github.com/rust-lang/rust-clippy/pull/5363. In that time, I have
been using it successfully in nightly without issues. I don't think
there are any blocking issues now that RUSTC_WORKSPACE_WRAPPER is
stabilized, so this can be stabilized.

changelog: Stabilize `cargo clippy --fix`
2021-06-29 13:03:45 +00:00
Fabian Wolff
69c8573ab5 Bless UI tests 2021-06-29 12:49:08 +02: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
f4bc9cf390 Auto merge of #7409 - xFrednet:5394-vs-code-tasks, r=giraffate,flip1995
Added `cargo dev setup vscode-tasks` for simplicity

This PR adds a setup command to `clippy dev` that installs tasks into the Clippy vscode workspace. These might be useful as they be used via shortcuts and are accessible over the GUI. The available tasks are:
* `cargo check` (standard Linux shortcut `[ctrl] + [shift] + b`)
* `cargo dev fmt`
* `cargo uitest` (with a comment how to add the `TESTNAME` environment value)
* `cargo test`
* `cargo dev bless`

---

changelog: none

only internal changes again. cc #5394

r? `@flip1995` This should be pretty much the same as the other `cargo dev setup` commands. Would you mind reviewing this? 🙃
2021-06-29 08:53:59 +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
Joshua Nelson
aa40487a84 Stabilize cargo clippy --fix
This has been unstable since it was first introduced in
https://github.com/rust-lang/rust-clippy/pull/5363. In that time, I have
been using it successfully in nightly without issues. I don't think
there are any blocking issues now that RUSTC_WORKSPACE_WRAPPER is
stabilized, so this can be stabilized.
2021-06-28 21:46:57 -04: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