]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #87154 - GuillaumeGomez:rev-attr-a, r=JohnTitor
Yuki Okushi [Thu, 15 Jul 2021 12:19:22 +0000 (21:19 +0900)]
Rollup merge of #87154 - GuillaumeGomez:rev-attr-a, r=JohnTitor

Fix misuse of rev attribute on <a> tag

The `rev` attribute is supposed to talk about "ownership" as far as I could found out. This attribute seems not very well defined in the HTML spec and its usage in rustdoc is suboptimal.

It was found out in https://github.com/rust-lang/rust/pull/87149.

r? `@JohnTitor`

3 years agoRollup merge of #87147 - ehuss:update-cargo, r=ehuss
Yuki Okushi [Thu, 15 Jul 2021 12:19:21 +0000 (21:19 +0900)]
Rollup merge of #87147 - ehuss:update-cargo, r=ehuss

Update cargo

13 commits in 3ebb5f15a940810f250b68821149387af583a79e..66a6737a0c9f3a974af2dd032a65d3e409c77aac
2021-07-02 20:35:38 +0000 to 2021-07-14 20:54:28 +0000
- Add format option to `cargo tree` to print the lib_name (rust-lang/cargo#9663)
- Prefer patched versions of dependencies (rust-lang/cargo#9639)
- When a dependency does not have a version, git or path, fails directly (rust-lang/cargo#9686)
- Spot the crate typo easily (rust-lang/cargo#9665)
- remove unnecessary 'collect' (rust-lang/cargo#9616)
- Make it easier to run testsuite with a custom toolchain. (rust-lang/cargo#9679)
- Serialize `cargo fix` (rust-lang/cargo#9677)
- Don't recommend filing issues on rust-lang/cargo for Cargo.toml errors. (rust-lang/cargo#9658)
- Update nightly failure notification. (rust-lang/cargo#9657)
- Update Windows env uppercase key check. (rust-lang/cargo#9654)
- Unignore fix_edition_2021. (rust-lang/cargo#9662)
- Warning when using features in patch (rust-lang/cargo#9666)
- Unify cargo and rustc's error reporting (rust-lang/cargo#9655)

3 years agoRollup merge of #87134 - BoxyUwU:cgd-self-ty-error, r=lcnr
Yuki Okushi [Thu, 15 Jul 2021 12:19:20 +0000 (21:19 +0900)]
Rollup merge of #87134 - BoxyUwU:cgd-self-ty-error, r=lcnr

Make SelfInTyParamDefault wording not be specific to type defaults

r? ```@lcnr```

3 years agoRollup merge of #87127 - poliorcetics:ptr-rotate-safety, r=scottmcm
Yuki Okushi [Thu, 15 Jul 2021 12:19:19 +0000 (21:19 +0900)]
Rollup merge of #87127 - poliorcetics:ptr-rotate-safety, r=scottmcm

Add safety comments in private core::slice::rotate::ptr_rotate function

Helps with #66219.

```@rustbot``` label C-cleanup T-compiler T-libs

3 years agoRollup merge of #87081 - a1phyr:add_wasi_ext_tracking_issue, r=dtolnay
Yuki Okushi [Thu, 15 Jul 2021 12:19:18 +0000 (21:19 +0900)]
Rollup merge of #87081 - a1phyr:add_wasi_ext_tracking_issue, r=dtolnay

Add tracking issue number to `wasi_ext`

Feature `wasi_ext` is tracked by #71213 but is was not in the source code.

3 years agoRollup merge of #86947 - m-ou-se:assert-matches-to-submodule, r=yaahc
Yuki Okushi [Thu, 15 Jul 2021 12:19:16 +0000 (21:19 +0900)]
Rollup merge of #86947 - m-ou-se:assert-matches-to-submodule, r=yaahc

Move assert_matches to an inner module

Fixes #82913

3 years agoRollup merge of #86478 - ehuss:future-incompat-test, r=oli-obk
Yuki Okushi [Thu, 15 Jul 2021 12:19:11 +0000 (21:19 +0900)]
Rollup merge of #86478 - ehuss:future-incompat-test, r=oli-obk

Add -Zfuture-incompat-test to assist with testing future-incompat reports.

This adds a `-Zfuture-incompat-test` cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure.  Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, #86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.

3 years agoRollup merge of #85579 - alex:patch-1, r=yaahc
Yuki Okushi [Thu, 15 Jul 2021 12:19:10 +0000 (21:19 +0900)]
Rollup merge of #85579 - alex:patch-1, r=yaahc

Added Arc::try_pin

This helper is in line with other other allocation helpers on Arc.

I didn't think this would require an RFC or broader discussion, let me know if that's incorrect.

3 years agoAdded Arc::try_pin
Alex Gaynor [Sat, 22 May 2021 14:24:50 +0000 (10:24 -0400)]
Added Arc::try_pin

This helper is in line with other other allocation helpers on Arc.

3 years agoFix misuse of rev attribute on <a> tag
Guillaume Gomez [Thu, 15 Jul 2021 11:05:15 +0000 (13:05 +0200)]
Fix misuse of rev attribute on <a> tag

3 years agoUpdate cargo
Eric Huss [Thu, 15 Jul 2021 02:56:42 +0000 (19:56 -0700)]
Update cargo

3 years agoAuto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov
bors [Thu, 15 Jul 2021 02:39:38 +0000 (02:39 +0000)]
Auto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov

Reuse CrateNum for proc-macro crates even when cross-compiling

Proc-macros are always compiled for the host, so this should be the same
in every way as recompiling the crate.

I am not sure why the previous code special-cased the target, since the
compiler properly gives an error when trying to load a crate for a
different host:

```
error[E0461]: couldn't find crate `dependency` with expected target triple x86_64-unknown-linux-gnu
  --> /home/joshua/rustc4/src/test/ui/cfg-dependent.rs:8:2
   |
LL |     dependency::is_64();
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `dependency`, target triple i686-unknown-linux-gnu: /home/joshua/rustc4/build/x86_64-unknown-linux-gnu/test/ui/cfg-dependent/auxiliary/libdependency.so
```

I think another possible fix is to remove the check altogether. But I'm
not sure, and this fix works, so I'm not making the larger change here.

Fixes https://github.com/rust-lang/rust/issues/56935.

r? `@petrochenkov` cc `@alexcrichton`

3 years agoReuse CrateNum for proc-macro crates even when cross-compiling
Joshua Nelson [Sun, 4 Jul 2021 03:35:24 +0000 (23:35 -0400)]
Reuse CrateNum for proc-macro crates even when cross-compiling

Proc-macros are always compiled for the host, so this should be the same
in every way as recompiling the crate.

I am not sure why the previous code special-cased the target, since the
compiler properly gives an error when trying to load a crate for a
different host:

```
error[E0461]: couldn't find crate `dependency` with expected target triple x86_64-unknown-linux-gnu
  --> /home/joshua/rustc4/src/test/ui/cfg-dependent.rs:8:2
   |
LL |     dependency::is_64();
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `dependency`, target triple i686-unknown-linux-gnu: /home/joshua/rustc4/build/x86_64-unknown-linux-gnu/test/ui/cfg-dependent/auxiliary/libdependency.so
```

I think another possible fix is to remove the check altogether. But I'm
not sure, and this fix works, so I'm not making the larger change here.

3 years agoAuto merge of #87137 - richkadel:compiler-builtins-0.1.47, r=tmandry
bors [Wed, 14 Jul 2021 23:58:43 +0000 (23:58 +0000)]
Auto merge of #87137 - richkadel:compiler-builtins-0.1.47, r=tmandry

Update compiler-builtins to 0.1.47

  Bumped to `0.1.47` to resolve missing symbols on `aarch` when linking
  `cargo`. This was due to a recent change in a `cargo` dependency on
  `curl` (upstream C library added code that uses the uncommon `long
  double` type).

r? `@tmandry`

3 years agoAuto merge of #86765 - cuviper:fuse-less-specialized, r=joshtriplett
bors [Wed, 14 Jul 2021 21:17:52 +0000 (21:17 +0000)]
Auto merge of #86765 - cuviper:fuse-less-specialized, r=joshtriplett

Make the specialized Fuse still deal with None

Fixes #85863 by removing the assumption that we'll never see a cleared iterator in the `I: FusedIterator` specialization. Now all `Fuse` methods check for the possibility that `self.iter` is `None`, and the specialization only avoids _setting_ that to `None` in `&mut self` methods.

3 years agoUpdate compiler-builtins to 0.1.47
Rich Kadel [Wed, 14 Jul 2021 20:45:16 +0000 (13:45 -0700)]
Update compiler-builtins to 0.1.47

  Bumped to `0.1.47` to resolve missing symbols on `aarch` when linking
  `cargo`. This was due to a recent change in a `cargo` dependency on
  `curl` (upstream C library added code that uses the uncommon `long
  double` type).

3 years agoOOPS
Ellen [Wed, 14 Jul 2021 18:38:58 +0000 (19:38 +0100)]
OOPS

3 years agoAuto merge of #87133 - GuillaumeGomez:rollup-pfz9jbk, r=GuillaumeGomez
bors [Wed, 14 Jul 2021 18:36:44 +0000 (18:36 +0000)]
Auto merge of #87133 - GuillaumeGomez:rollup-pfz9jbk, r=GuillaumeGomez

Rollup of 6 pull requests

Successful merges:

 - #87027 (expand: Support helper attributes for built-in derive macros)
 - #87056 (Fix codeblocks overflow)
 - #87117 (Shrink the CrateStore dynamic interface.)
 - #87120 (rustdoc: Remove unnecessary `extern crate` aliases)
 - #87125 (Fix Ayu theme `<code>` color)
 - #87130 (Update browser-ui-test package version)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoChange type param -> generic param
Ellen [Wed, 14 Jul 2021 18:22:32 +0000 (19:22 +0100)]
Change type param -> generic param

3 years agoRollup merge of #87130 - GuillaumeGomez:update-browser-ui-test, r=Mark-Simulacrum
Guillaume Gomez [Wed, 14 Jul 2021 17:53:41 +0000 (19:53 +0200)]
Rollup merge of #87130 - GuillaumeGomez:update-browser-ui-test, r=Mark-Simulacrum

Update browser-ui-test package version

It adds a check to prevent to have empty CSS values in `assert-css` command.

r? `@Mark-Simulacrum`

3 years agoRollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddle
Guillaume Gomez [Wed, 14 Jul 2021 17:53:40 +0000 (19:53 +0200)]
Rollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddle

Fix Ayu theme <code> color

Fixes #87072 (the second regression).

r? `@notriddle`

3 years agoRollup merge of #87120 - jyn514:rustdoc-cleanup, r=CraftSpider
Guillaume Gomez [Wed, 14 Jul 2021 17:53:38 +0000 (19:53 +0200)]
Rollup merge of #87120 - jyn514:rustdoc-cleanup, r=CraftSpider

rustdoc: Remove unnecessary `extern crate` aliases

3 years agoRollup merge of #87117 - cjgillot:cstore, r=petrochenkov
Guillaume Gomez [Wed, 14 Jul 2021 17:53:37 +0000 (19:53 +0200)]
Rollup merge of #87117 - cjgillot:cstore, r=petrochenkov

Shrink the CrateStore dynamic interface.

The information is either accessible through queries or by crates which already depend on rustc_metadata.

3 years agoRollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddle
Guillaume Gomez [Wed, 14 Jul 2021 17:53:36 +0000 (19:53 +0200)]
Rollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddle

Fix codeblocks overflow

Fixes #87043.

Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes.

r? `@Nemo157`

3 years agoRollup merge of #87027 - petrochenkov:builderhelp, r=oli-obk
Guillaume Gomez [Wed, 14 Jul 2021 17:53:35 +0000 (19:53 +0200)]
Rollup merge of #87027 - petrochenkov:builderhelp, r=oli-obk

expand: Support helper attributes for built-in derive macros

This is needed for https://github.com/rust-lang/rust/pull/86735 (derive macro `Default` should have a helper attribute `default`).

With this PR we can specify helper attributes for built-in derives using syntax `#[rustc_builtin_macro(MacroName, attributes(attr1, attr2, ...))]` which mirrors equivalent syntax for proc macros `#[proc_macro_derive(MacroName, attributes(attr1, attr2, ...))]`.
Otherwise expansion infra was already ready for this.
The attribute parsing code is shared between proc macro derives and built-in macros (`fn parse_macro_name_and_helper_attrs`).

3 years agoAdd -Zfuture-incompat-test to assist with testing future-incompat reports.
Eric Huss [Sun, 20 Jun 2021 00:06:46 +0000 (17:06 -0700)]
Add -Zfuture-incompat-test to assist with testing future-incompat reports.

3 years agoAuto merge of #87082 - michaelwoerister:const-in-debuginfo-type-names-fix, r=oli...
bors [Wed, 14 Jul 2021 15:18:27 +0000 (15:18 +0000)]
Auto merge of #87082 - michaelwoerister:const-in-debuginfo-type-names-fix, r=oli-obk,wesleywiser

Handle non-integer const generic parameters in debuginfo type names.

This PR fixes an ICE introduced by https://github.com/rust-lang/rust/pull/85269 which started emitting const generic arguments for debuginfo names but did not cover the case where such an argument could not be evaluated to a flat string of bits.

The fix implemented in this PR is very basic: If `try_eval_bits()` fails for the constant in question, we fall back to generating a stable hash of the constant and emit that instead. This way we get a (virtually) unique name and side step the problem of generating a string representation of a potentially complex value.

The downside is that the generated name will be rather opaque. E.g. the regression test adds a function `const_generic_fn_non_int<()>` which is then rendered as `const_generic_fn_non_int<{CONST#fe3cfa0214ac55c7}>`. I think it's an open question how to deal with this more gracefully.

I'd be interested in ideas on how to do this better.

r? `@wesleywiser`

cc `@dpaoliello` (do you see any problems with this approach?)
cc `@Mark-Simulacrum` & `@nagisa` (who I've seen comment on debuginfo issues recently -- anyone else?)

Fixes https://github.com/rust-lang/rust/issues/86893

3 years agoShrink the CrateStore dynamic interface.
Camille GILLOT [Mon, 12 Jul 2021 19:20:16 +0000 (21:20 +0200)]
Shrink the CrateStore dynamic interface.

3 years agoUpdate browser-ui-test package version
Guillaume Gomez [Wed, 14 Jul 2021 14:28:15 +0000 (16:28 +0200)]
Update browser-ui-test package version

3 years agoHandle non-integer const generic parameters in debuginfo type names.
Michael Woerister [Mon, 12 Jul 2021 13:12:49 +0000 (15:12 +0200)]
Handle non-integer const generic parameters in debuginfo type names.

3 years agoAdd safety comments in private core::slice::rotate::ptr_rotate function
Alexis Bourget [Wed, 14 Jul 2021 13:31:12 +0000 (15:31 +0200)]
Add safety comments in private core::slice::rotate::ptr_rotate function

3 years agoAdd GUI test to check ayu <code> colors
Guillaume Gomez [Wed, 14 Jul 2021 13:00:12 +0000 (15:00 +0200)]
Add GUI test to check ayu <code> colors

3 years agoAuto merge of #87118 - JohnTitor:rollup-8ltidsq, r=JohnTitor
bors [Wed, 14 Jul 2021 12:49:45 +0000 (12:49 +0000)]
Auto merge of #87118 - JohnTitor:rollup-8ltidsq, r=JohnTitor

Rollup of 6 pull requests

Successful merges:

 - #87085 (Search result colors)
 - #87090 (Make BTreeSet::split_off name elements like other set methods do)
 - #87098 (Unignore some pretty printing tests)
 - #87099 (Upgrade `cc` crate to 1.0.69)
 - #87101 (Suggest a path separator if a stray colon is found in a match arm)
 - #87102 (Add GUI test for "go to first" feature)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoFix color for <code> which are not in doc blocks
Guillaume Gomez [Wed, 14 Jul 2021 12:47:54 +0000 (14:47 +0200)]
Fix color for <code> which are not in doc blocks

3 years agoAdd test for codeblocks overflow
Guillaume Gomez [Sun, 11 Jul 2021 11:06:48 +0000 (13:06 +0200)]
Add test for codeblocks overflow

3 years agoFix display for non-rust code blocks
Guillaume Gomez [Sun, 11 Jul 2021 10:40:31 +0000 (12:40 +0200)]
Fix display for non-rust code blocks

3 years agoAuto merge of #86211 - tlyu:option-result-overviews, r=joshtriplett
bors [Wed, 14 Jul 2021 05:10:57 +0000 (05:10 +0000)]
Auto merge of #86211 - tlyu:option-result-overviews, r=joshtriplett

create method overview docs for core::option and core::result

The `Option` and `Result` types have large lists of methods. They each could use an overview page of methods grouped by category. These proposed overviews include "truth tables" for the underappreciated boolean operators/combinators of these types. The methods are already somewhat categorized in the source, but some logical groupings are broken up by the necessities of putting related methods in different `impl` blocks, for example.

This is based on #86209, but those are small changes and unlikely to conflict.

3 years agoRemove useless alias from `rustc_span` to itself
Joshua Nelson [Wed, 14 Jul 2021 01:41:05 +0000 (21:41 -0400)]
Remove useless alias from `rustc_span` to itself

3 years agoRemove renaming of `test` crate
Joshua Nelson [Wed, 14 Jul 2021 01:40:09 +0000 (21:40 -0400)]
Remove renaming of `test` crate

This is leftover from when `doctest` used to be called `test`. Remove it
now, it's unnecessary and makes the code harder to read.

3 years agoAuto merge of #87106 - Mark-Simulacrum:edition-no-clone, r=petrochenkov
bors [Wed, 14 Jul 2021 01:41:12 +0000 (01:41 +0000)]
Auto merge of #87106 - Mark-Simulacrum:edition-no-clone, r=petrochenkov

Avoid cloning ExpnData to access Span edition

ExpnData is a fairly hefty structure to clone; cloning it may not be cheap. In
some cases this may get optimized out, but it's not clear that will always be
the case. Try to avoid that cost.

r? `@ghost` -- opening for a perf run to start with

3 years agoRollup merge of #87102 - GuillaumeGomez:go-to-first-feature, r=Manisheart,notriddle
Yuki Okushi [Wed, 14 Jul 2021 00:35:27 +0000 (09:35 +0900)]
Rollup merge of #87102 - GuillaumeGomez:go-to-first-feature, r=Manisheart,notriddle

Add GUI test for "go to first" feature

It adds a test for #85876 to ensure the feature is working as expected and prevent potential regression.

cc ```@jeanlucthumm```

r? ```@Manishearth```

3 years agoRollup merge of #87101 - FabianWolff:issue-87086, r=estebank
Yuki Okushi [Wed, 14 Jul 2021 00:35:26 +0000 (09:35 +0900)]
Rollup merge of #87101 - FabianWolff:issue-87086, r=estebank

Suggest a path separator if a stray colon is found in a match arm

Attempts to fix #87086.

r? `@estebank`

3 years agoRollup merge of #87099 - JohnTitor:upgrade-cc-crate, r=alexcrichton
Yuki Okushi [Wed, 14 Jul 2021 00:35:25 +0000 (09:35 +0900)]
Rollup merge of #87099 - JohnTitor:upgrade-cc-crate, r=alexcrichton

Upgrade `cc` crate to 1.0.69

This pulls another fix for #83043, i.e., alexcrichton/cc-rs#605.
r? ``@alexcrichton``

3 years agoRollup merge of #87098 - JohnTitor:unignore-some-tests, r=petrochenkov
Yuki Okushi [Wed, 14 Jul 2021 00:35:23 +0000 (09:35 +0900)]
Rollup merge of #87098 - JohnTitor:unignore-some-tests, r=petrochenkov

Unignore some pretty printing tests

Closes #37201
r? ````@petrochenkov````

3 years agoRollup merge of #87090 - ssomers:btree_comments, r=the8472
Yuki Okushi [Wed, 14 Jul 2021 00:35:22 +0000 (09:35 +0900)]
Rollup merge of #87090 - ssomers:btree_comments, r=the8472

Make BTreeSet::split_off name elements like other set methods do

r? ````@Mark-Simulacrum````

3 years agoRollup merge of #87085 - GuillaumeGomez:search-result-colors, r=notriddle
Yuki Okushi [Wed, 14 Jul 2021 00:35:22 +0000 (09:35 +0900)]
Rollup merge of #87085 - GuillaumeGomez:search-result-colors, r=notriddle

Search result colors

Part of  #87072 (fixes the first and fourth regressions and add tests to prevent it from happening again).

cc ````@Nemo157````

r? ````@camelid````

3 years agoSuggest a path separator if a stray colon is found in a match arm
Fabian Wolff [Tue, 13 Jul 2021 11:18:03 +0000 (13:18 +0200)]
Suggest a path separator if a stray colon is found in a match arm

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
3 years agoAuto merge of #87044 - cjgillot:expnhash, r=petrochenkov
bors [Tue, 13 Jul 2021 22:32:58 +0000 (22:32 +0000)]
Auto merge of #87044 - cjgillot:expnhash, r=petrochenkov

Cache expansion hash globally

... instead of computing it multiple times.

Split from #86676
r? `@petrochenkov`

3 years agoCache expansion hash.
Camille GILLOT [Tue, 22 Jun 2021 17:20:25 +0000 (19:20 +0200)]
Cache expansion hash.

3 years agoMove HashStable implementations.
Camille GILLOT [Tue, 22 Jun 2021 17:16:18 +0000 (19:16 +0200)]
Move HashStable implementations.

3 years agoexpand: Support helper attributes for built-in derive macros
Vadim Petrochenkov [Sat, 10 Jul 2021 14:16:53 +0000 (17:16 +0300)]
expand: Support helper attributes for built-in derive macros

3 years agoAdd test for "go to first" feature
Guillaume Gomez [Tue, 13 Jul 2021 12:41:19 +0000 (14:41 +0200)]
Add test for "go to first" feature

3 years agoAuto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk
bors [Tue, 13 Jul 2021 15:06:10 +0000 (15:06 +0000)]
Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk

Fix internal `default_hash_types` lint to use resolved path

I run into false positives now and then (mostly in Clippy) when I want to name some util after HashMap.

3 years agoAvoid cloning ExpnData to access Span edition
Mark Rousskov [Tue, 13 Jul 2021 14:57:10 +0000 (10:57 -0400)]
Avoid cloning ExpnData to access Span edition

ExpnData is a fairly hefty structure to clone; cloning it may not be cheap. In
some cases this may get optimized out, but it's not clear that will always be
the case. Try to avoid that cost.

3 years agoAuto merge of #86922 - joshtriplett:target-abi, r=oli-obk
bors [Tue, 13 Jul 2021 12:25:10 +0000 (12:25 +0000)]
Auto merge of #86922 - joshtriplett:target-abi, r=oli-obk

target abi

Implement cfg(target_abi) (RFC 2992)

Add an `abi` field to `TargetOptions`, defaulting to "". Support using
`cfg(target_abi = "...")` for conditional compilation on that field.

Gated by `feature(cfg_target_abi)`.

Add a test for `target_abi`, and a test for the feature gate.

Add `target_abi` to tidy as a platform-specific cfg.

Update targets to use `target_abi`

All eabi targets have `target_abi = "eabi".`
All eabihf targets have `target_abi = "eabihf"`.
`armv6_unknown_freebsd` and `armv7_unknown_freebsd` have `target_abi = "eabihf"`.
All abi64 targets have `target_abi = "abi64"`.
All ilp32 targets have `target_abi = "ilp32"`.
All softfloat targets have `target_abi = "softfloat"`.
All *-uwp-windows-* targets have `target_abi = "uwp"`.
All spe targets have `target_abi = "spe"`.
All macabi targets have `target_abi = "macabi"`.
aarch64-apple-ios-sim has `target_abi = "sim"`.
`x86_64-fortanix-unknown-sgx` has `target_abi = "fortanix"`.
`x86_64-unknown-linux-gnux32` has `target_abi = "x32"`.

Add FIXME entries for targets for which existing values need to change
once `cfg_target_abi` becomes stable. (All of them are tier 3 targets.)

Add a test for `target_abi` in `--print cfg`.

3 years agoAuto merge of #87019 - nikic:clang-12.0.1, r=Mark-Simulacrum
bors [Tue, 13 Jul 2021 09:40:28 +0000 (09:40 +0000)]
Auto merge of #87019 - nikic:clang-12.0.1, r=Mark-Simulacrum

Use clang 12.0.1 on dist-x86_64/i686-linux

The LLD + ThinLTO __morestack bug has been fixed in 12.0.1, so
we can now update our clang version. This also means that we no
longer need to build Python 2.

3 years agoUpgrade `cc` crate to 1.0.69
Yuki Okushi [Tue, 13 Jul 2021 08:58:50 +0000 (17:58 +0900)]
Upgrade `cc` crate to 1.0.69

3 years agoAdd test for keyword/primitive text color
Guillaume Gomez [Mon, 12 Jul 2021 15:42:59 +0000 (17:42 +0200)]
Add test for keyword/primitive text color

3 years agoFix color for keyword/primitive search result
Guillaume Gomez [Mon, 12 Jul 2021 15:42:53 +0000 (17:42 +0200)]
Fix color for keyword/primitive search result

3 years agoAdd test for search results colors
Guillaume Gomez [Mon, 12 Jul 2021 14:48:25 +0000 (16:48 +0200)]
Add test for search results colors

3 years agoFix search result description text color for ayu theme
Guillaume Gomez [Mon, 12 Jul 2021 14:32:26 +0000 (16:32 +0200)]
Fix search result description text color for ayu theme

3 years agoUnignore some pretty printing tests
Yuki Okushi [Tue, 13 Jul 2021 07:55:40 +0000 (16:55 +0900)]
Unignore some pretty printing tests

3 years agoAuto merge of #86857 - fee1-dead:add-attr, r=oli-obk
bors [Tue, 13 Jul 2021 06:59:34 +0000 (06:59 +0000)]
Auto merge of #86857 - fee1-dead:add-attr, r=oli-obk

Add #[default_method_body_is_const]

`@rustbot` label F-const_trait_impl

3 years agoAuto merge of #86665 - FabianWolff:layout-field-thir-unsafeck, r=oli-obk
bors [Tue, 13 Jul 2021 04:38:39 +0000 (04:38 +0000)]
Auto merge of #86665 - FabianWolff:layout-field-thir-unsafeck, r=oli-obk

Implement Mutation- and BorrowOfLayoutConstrainedField in thir-unsafeck

Since nobody has so far claimed Mutation- and BorrowOfLayoutConstrainedField in rust-lang/project-thir-unsafeck#7, I have taken the liberty of implementing them in thir-unsafeck.

r? `@LeSeulArtichaut`

3 years agoAuto merge of #87095 - JohnTitor:rollup-mn7ggy2, r=JohnTitor
bors [Tue, 13 Jul 2021 01:52:49 +0000 (01:52 +0000)]
Auto merge of #87095 - JohnTitor:rollup-mn7ggy2, r=JohnTitor

Rollup of 11 pull requests

Successful merges:

 - #86344 (Split MaybeUninit::write into new feature gate and stabilize it)
 - #86811 (Remove unstable `io::Cursor::remaining`)
 - #86846 (stdio_locked: add tracking issue)
 - #86887 (rustdoc: remove dead code in `clean`)
 - #87007 (Fix rust-analyzer install when not available.)
 - #87035 (Fix implementors display)
 - #87065 (Fix ICE with unsized type in const pattern)
 - #87070 (Simplify future incompatible reporting.)
 - #87077 (:arrow_up: rust-analyzer)
 - #87078 (Rustdoc: suggest removing disambiguator if linking to field)
 - #87089 (CTFE engine: small cleanups)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #87089 - RalfJung:ctfe-memory-cleanup, r=oli-obk
Yuki Okushi [Mon, 12 Jul 2021 23:54:39 +0000 (08:54 +0900)]
Rollup merge of #87089 - RalfJung:ctfe-memory-cleanup, r=oli-obk

CTFE engine: small cleanups

I noticed these while preparing a large PR, and figured I'd better send them ahead to not muddy the diff unnecessarily.

- remove remaining use of Pointer in Allocation API (I missed those in https://github.com/rust-lang/rust/pull/85472)
- remove unnecessary deallocate_local hack (this logic does not seem necessary any more)

r? `@oli-obk`

3 years agoRollup merge of #87078 - fee1-dead:rustdoc, r=jyn514
Yuki Okushi [Mon, 12 Jul 2021 23:54:38 +0000 (08:54 +0900)]
Rollup merge of #87078 - fee1-dead:rustdoc, r=jyn514

Rustdoc: suggest removing disambiguator if linking to field

This fixes #85615.

`@rustbot` label T-rustdoc

3 years agoRollup merge of #87077 - lnicola:rust-analyzer-2021-07-12, r=lnicola
Yuki Okushi [Mon, 12 Jul 2021 23:54:37 +0000 (08:54 +0900)]
Rollup merge of #87077 - lnicola:rust-analyzer-2021-07-12, r=lnicola

:arrow_up: rust-analyzer

`@bors` r+

3 years agoRollup merge of #87070 - ehuss:simplify-future-report, r=oli-obk
Yuki Okushi [Mon, 12 Jul 2021 23:54:36 +0000 (08:54 +0900)]
Rollup merge of #87070 - ehuss:simplify-future-report, r=oli-obk

Simplify future incompatible reporting.

This simplifies the implementation of the future incompatible reporting system. Instead of having a separate field in the future_incompatible definition, this reuses the `FutureIncompatibilityReason` enum. It also drops the "date" field. Cargo does not use the date field, and there isn't much of a need for this to be structured, and I am skeptical that the date can be predicted reliably. The date or release version can be listed in the lint text if desired.

3 years agoRollup merge of #87065 - FabianWolff:issue-87046, r=oli-obk
Yuki Okushi [Mon, 12 Jul 2021 23:54:34 +0000 (08:54 +0900)]
Rollup merge of #87065 - FabianWolff:issue-87046, r=oli-obk

Fix ICE with unsized type in const pattern

Fixes #87046. The `deref_const()` query currently contains the following check:
https://github.com/rust-lang/rust/blob/e9a387d6cf5961a7f2dcb671da3147bd413355c4/compiler/rustc_mir/src/const_eval/mod.rs#L191-L204

i.e. this will cause an ICE for every unsized type except slices. An error is reported with my changes if such a type is used as a const pattern (this should not be a breaking change, since so far, this has caused an ICE).

3 years agoRollup merge of #87035 - GuillaumeGomez:fix-implementors-display, r=notriddle
Yuki Okushi [Mon, 12 Jul 2021 23:54:33 +0000 (08:54 +0900)]
Rollup merge of #87035 - GuillaumeGomez:fix-implementors-display, r=notriddle

Fix implementors display

Part of https://github.com/rust-lang/rust/issues/86632.

This PR does a few things:
 * It fixes of the JS rendered implementors.
 * It generates anchors for JS rendered implementors to make it coherent with the others.
 * It adds a test to ensure that we won't have the same issue again.
 * It changes the way we render the rustdoc-gui crates to simplify it a bit and also to allow to have dependencies without going through compiletest.

Before:

![Screenshot from 2021-07-10 13-30-13](https://user-images.githubusercontent.com/3050060/125174172-b4048700-e1c3-11eb-8f0e-c46081371d4f.png)

After:

![Screenshot from 2021-07-10 21-11-15](https://user-images.githubusercontent.com/3050060/125174173-b49d1d80-e1c3-11eb-8740-1dbbff70c2eb.png)

I plan to add the `[src]` links in another PR because this one is already big enough.

cc `@Mark-Simulacrum` (for the bootstrap changes)

r? `@Nemo157`

3 years agoRollup merge of #87007 - ehuss:fix-rust-analyzer-install, r=Mark-Simulacrum
Yuki Okushi [Mon, 12 Jul 2021 23:54:32 +0000 (08:54 +0900)]
Rollup merge of #87007 - ehuss:fix-rust-analyzer-install, r=Mark-Simulacrum

Fix rust-analyzer install when not available.

This changes it so that `x.py install` won't fail if rust-analyzer isn't available. This was changed in #86568 to handle the case where installing on stable/beta, and `extended=true`, to skip rust-analyzer. But I neglected to update the install part to also ignore it.

Fixes #86999

3 years agoRollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpider
Yuki Okushi [Mon, 12 Jul 2021 23:54:31 +0000 (08:54 +0900)]
Rollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpider

rustdoc: remove dead code in `clean`

Builds on https://github.com/rust-lang/rust/pull/86886 and should not be merged before.

3 years agoRollup merge of #86846 - tlyu:stdio-locked-tracking, r=joshtriplett
Yuki Okushi [Mon, 12 Jul 2021 23:54:30 +0000 (08:54 +0900)]
Rollup merge of #86846 - tlyu:stdio-locked-tracking, r=joshtriplett

stdio_locked: add tracking issue

Add the tracking issue number #86845 to the stability attributes for the implementation in #86799.

r? `@joshtriplett`
`@rustbot` label +A-io +C-cleanup +T-libs-api

3 years agoRollup merge of #86811 - soerenmeier:remove_remaining, r=yaahc
Yuki Okushi [Mon, 12 Jul 2021 23:54:28 +0000 (08:54 +0900)]
Rollup merge of #86811 - soerenmeier:remove_remaining, r=yaahc

Remove unstable `io::Cursor::remaining`

Adding `io::Cursor::remaining` in #86037 caused a conflict with the implementation of `bytes::Buf` for `io::Cursor`, leading to an error in nightly, see https://github.com/rust-lang/rust/issues/86369#issuecomment-867723485.

This fixes the error by temporarily removing the `remaining` function.

r? `@yaahc`

3 years agoRollup merge of #86344 - est31:maybe-uninit-extra, r=RalfJung
Yuki Okushi [Mon, 12 Jul 2021 23:54:27 +0000 (08:54 +0900)]
Rollup merge of #86344 - est31:maybe-uninit-extra, r=RalfJung

Split MaybeUninit::write into new feature gate and stabilize it

This splits off the `MaybeUninit::write` function from the `maybe_uninit_extra` feature gate into a new `maybe_uninit_write` feature gate and stabilizes it.

Earlier work to improve the documentation of the write function: #86220

Tracking issue: #63567

3 years agoAuto merge of #87018 - nikic:llvm-12.0.1, r=Mark-Simulacrum
bors [Mon, 12 Jul 2021 23:24:25 +0000 (23:24 +0000)]
Auto merge of #87018 - nikic:llvm-12.0.1, r=Mark-Simulacrum

Update to LLVM 12.0.1

LLVM 12.0.1 has been released, rebase our fork on top of it.

3 years agoMake BTreeSet::split_off name elements like other set methods do
Stein Somers [Wed, 18 Nov 2020 17:19:38 +0000 (18:19 +0100)]
Make BTreeSet::split_off name elements like other set methods do

3 years agoAuto merge of #86320 - hi-rustin:rustin-patch-fix-span, r=estebank
bors [Mon, 12 Jul 2021 20:43:28 +0000 (20:43 +0000)]
Auto merge of #86320 - hi-rustin:rustin-patch-fix-span, r=estebank

shrinking the deprecated span

ref: https://github.com/rust-lang/rust/pull/85617#issuecomment-854947988

part of #85403

r? `@estebank`

The reason is that if we use method_span directly, it will cause the in_derive_expansion judgment to fail.

3 years agoProvide a better error when `x.py install src/doc` doesn't work.
Eric Huss [Mon, 12 Jul 2021 20:29:47 +0000 (13:29 -0700)]
Provide a better error when `x.py install src/doc` doesn't work.

3 years agoUse the write function in some more places
est31 [Mon, 12 Jul 2021 18:32:23 +0000 (20:32 +0200)]
Use the write function in some more places

3 years agoremove unnecessary deallocate_local hack
Ralf Jung [Mon, 12 Jul 2021 16:45:56 +0000 (18:45 +0200)]
remove unnecessary deallocate_local hack

3 years agoAdd test for implementors
Guillaume Gomez [Sat, 10 Jul 2021 19:10:14 +0000 (21:10 +0200)]
Add test for implementors

3 years agoSimplify build system for rustdoc-gui test crates
Guillaume Gomez [Sat, 10 Jul 2021 19:09:51 +0000 (21:09 +0200)]
Simplify build system for rustdoc-gui test crates

3 years agoAuto merge of #87087 - fee1-dead:fix-try-2, r=joshtriplett
bors [Mon, 12 Jul 2021 16:55:44 +0000 (16:55 +0000)]
Auto merge of #87087 - fee1-dead:fix-try-2, r=joshtriplett

Remove `multiple-definitions` test

r? `@joshtriplett`

Temporary solution to #87084.

3 years agoremove remaining use of Pointer in Allocation API
Ralf Jung [Mon, 12 Jul 2021 16:45:26 +0000 (18:45 +0200)]
remove remaining use of Pointer in Allocation API

3 years agoRemove `multiple-definitions` test
Deadbeef [Mon, 12 Jul 2021 16:14:28 +0000 (00:14 +0800)]
Remove `multiple-definitions` test

3 years agoAdd tracking issue number to `wasi_ext`
Benoît du Garreau [Mon, 12 Jul 2021 12:59:29 +0000 (14:59 +0200)]
Add tracking issue number to `wasi_ext`

3 years agoAuto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremee
bors [Mon, 12 Jul 2021 11:52:55 +0000 (11:52 +0000)]
Auto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremee

Fix rendering of reexported macros 2.0 and fix visibility of reexported items

So, this PR grew a bit out of focus, it does the following things:

* Fixes #86276.
* Fixes visibility display for reexported items: it now takes the visibility of the "use" statement rather than the visibility of the reexported item itself).
* Fixes the display of reexported items if "--document-private-items" option is used. Before, they were simply skipped.
* Fixes inconsistency on typedef items: they didn't display their visibility contrary to other items.

I added tests to check everything listed above.

cc `@camelid` `@ollie27` (in case one of you want to review?)

r? `@jyn514`

3 years agosuggest removing disambiguator if linking to field
Deadbeef [Mon, 12 Jul 2021 11:04:51 +0000 (19:04 +0800)]
suggest removing disambiguator if linking to field

3 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Mon, 12 Jul 2021 06:54:59 +0000 (09:54 +0300)]
:arrow_up: rust-analyzer

3 years agoUpdate to LLVM 12.0.1
Nikita Popov [Sat, 10 Jul 2021 08:20:19 +0000 (10:20 +0200)]
Update to LLVM 12.0.1

3 years agoAuto merge of #86815 - FabianWolff:issue-84210, r=varkor
bors [Mon, 12 Jul 2021 01:00:43 +0000 (01:00 +0000)]
Auto merge of #86815 - FabianWolff:issue-84210, r=varkor

Improve error reporting for modifications behind `&` references

I had a look at #84210 and noticed that #85823 has effectively already fixed #84210.

However, the string matching in #85823 is _very_ crude and already breaks down when a variable name starts with `mut`. I have made this a bit more robust; further improvements could definitely be made but are complicated by the lack of information provided by an earlier pass:
https://github.com/rust-lang/rust/blob/ce331ee6ee010438d1a58c7da8ced4f26d69a20e/compiler/rustc_mir_build/src/build/matches/mod.rs#L2103-L2107

I have also fixed a missing comma in the error message.

3 years agoAuto merge of #86249 - FabianWolff:issue-86238, r=varkor
bors [Sun, 11 Jul 2021 22:39:16 +0000 (22:39 +0000)]
Auto merge of #86249 - FabianWolff:issue-86238, r=varkor

Report an error if resolution of closure call functions failed

This pull request fixes #86238. The current implementation seems to assume that resolution of closure call functions (I'm not sure what the proper term is; I mean `call` of `Fn` etc.) can never fail:
https://github.com/rust-lang/rust/blob/60f1a2fc4b535ead9c85ce085fdce49b1b097531/compiler/rustc_typeck/src/check/callee.rs#L590-L595

But actually, it can, if the `fn`/`fn_mut`/`fn_once` lang items are not defined, or don't have an associated `call`/`call_mut`/`call_once` function, leading to the ICE described in #86238. I have therefore turned the `span_bug!()` into an error message, which prevents the ICE.

3 years agoSimplify future incompatible reporting.
Eric Huss [Sun, 11 Jul 2021 20:08:58 +0000 (13:08 -0700)]
Simplify future incompatible reporting.

3 years agoAuto merge of #87068 - JohnTitor:rollup-2xuisfx, r=JohnTitor
bors [Sun, 11 Jul 2021 19:34:04 +0000 (19:34 +0000)]
Auto merge of #87068 - JohnTitor:rollup-2xuisfx, r=JohnTitor

Rollup of 8 pull requests

Successful merges:

 - #73936 (Rustdoc: Change all 'optflag' arguments to 'optflagmulti')
 - #86926 (Update regex crates)
 - #86951 ([docs] Clarify behaviour of f64 and f32::sqrt when argument is negative zero)
 - #87031 (Update reference.md)
 - #87037 (cleanup(rustdoc): remove unused function getObjectNameById)
 - #87045 (Fix tracking issue for `bool_to_option`)
 - #87049 (Account for `submodules = false` in config.toml when updating LLVM submodule)
 - #87061 (Do not suggest adding a semicolon after `?`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #87061 - FabianWolff:issue-87051, r=oli-obk
Yuki Okushi [Sun, 11 Jul 2021 19:32:05 +0000 (04:32 +0900)]
Rollup merge of #87061 - FabianWolff:issue-87051, r=oli-obk

Do not suggest adding a semicolon after `?`

Fixes #87051. I have only modified `report_return_mismatched_types()`, i.e. my changes only affect suggestions to add `;` for return type mismatches, but this never makes sense after `?`, because the function cannot return `()` if `?` is used (it has to return a `Result` or an `Option`), and a semicolon won't help if the expected and actual `Err` types differ, even if the expected one is `()`.

3 years agoRollup merge of #87049 - jyn514:no-submodules, r=Mark-Simulacrum
Yuki Okushi [Sun, 11 Jul 2021 19:32:04 +0000 (04:32 +0900)]
Rollup merge of #87049 - jyn514:no-submodules, r=Mark-Simulacrum

Account for `submodules = false` in config.toml when updating LLVM submodule

Fixes https://github.com/rust-lang/rust/issues/86954.

r? ``@Mark-Simulacrum`` cc ``@durin42``

3 years agoRollup merge of #87045 - jhpratt:fix-tracking-issue, r=jyn514
Yuki Okushi [Sun, 11 Jul 2021 19:32:03 +0000 (04:32 +0900)]
Rollup merge of #87045 - jhpratt:fix-tracking-issue, r=jyn514

Fix tracking issue for `bool_to_option`

The previous tracking issue was closed in favor of the current.

3 years agoRollup merge of #87037 - notriddle:notriddle/search-cleanup-getobjectnamefromid,...
Yuki Okushi [Sun, 11 Jul 2021 19:32:02 +0000 (04:32 +0900)]
Rollup merge of #87037 - notriddle:notriddle/search-cleanup-getobjectnamefromid, r=GuillaumeGomez

cleanup(rustdoc): remove unused function getObjectNameById

This function was used in an earlier version, when idx's were used to serialize function inputs and outputs. That's not done any more, so removed the JS-side support for it.