]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #85897 - steffahn:update_unsound_label_for_triagebot, r=Mark-Simulacrum
Yuki Okushi [Thu, 3 Jun 2021 05:35:37 +0000 (14:35 +0900)]
Rollup merge of #85897 - steffahn:update_unsound_label_for_triagebot, r=Mark-Simulacrum

Update I-unsound label for triagebot

Following the remaming of the `I-unsound` label (removing the space and the emoji) as discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/A.20way.20to.20self-label.20soundness.20issues.3F/near/240962907) (or [in the archive](https://zulip-archive.rust-lang.org/122651general/88362Awaytoselflabelsoundnessissues.html#240962907)), this change of the `triagebot.toml` is necessary to keep the automatic `I-prioritize` flagging.

3 years agoRollup merge of #85896 - BoxyUwU:remove-fixme-fwd-declared-const-default, r=petrochenkov
Yuki Okushi [Thu, 3 Jun 2021 05:35:36 +0000 (14:35 +0900)]
Rollup merge of #85896 - BoxyUwU:remove-fixme-fwd-declared-const-default, r=petrochenkov

Add test for forward declared const param defaults

3 years agoRollup merge of #85880 - csmoe:ice-85768, r=oli-obk
Yuki Okushi [Thu, 3 Jun 2021 05:35:35 +0000 (14:35 +0900)]
Rollup merge of #85880 - csmoe:ice-85768, r=oli-obk

convert assertion on rvalue::threadlocalref to delay bug

Closes #85768
r? ``@oli-obk``

3 years agoRollup merge of #85877 - est31:intra_doc_links, r=jyn514
Yuki Okushi [Thu, 3 Jun 2021 05:35:34 +0000 (14:35 +0900)]
Rollup merge of #85877 - est31:intra_doc_links, r=jyn514

Intra doc link-ify a reference to a function

3 years agoRollup merge of #85852 - m-ou-se:machineapplicable-docs, r=nikomatsakis
Yuki Okushi [Thu, 3 Jun 2021 05:35:30 +0000 (14:35 +0900)]
Rollup merge of #85852 - m-ou-se:machineapplicable-docs, r=nikomatsakis

Clarify meaning of MachineApplicable suggestions.

This documents the meaning of MachineApplicable in case of multiple suggestions, as described in https://github.com/rust-lang/rust/issues/53934#issuecomment-831396123

r? ``@nikomatsakis``

3 years agoRollup merge of #85724 - sexxi-goose:rox-fix-issue-85435, r=nikomatsakis
Yuki Okushi [Thu, 3 Jun 2021 05:35:29 +0000 (14:35 +0900)]
Rollup merge of #85724 - sexxi-goose:rox-fix-issue-85435, r=nikomatsakis

Fix issue 85435 by restricting Fake Read precision

This PR fixes the root bug of issue #85435 by restricting Fake Read precision in closures and removing the feature gate introduced in PR #85564. More info [here](https://github.com/rust-lang/rust/issues/85561#issuecomment-846223784) and [here](https://github.com/rust-lang/rust/issues/85561#issuecomment-847270533).

Closes #85561

r? ``@nikomatsakis``

3 years agoRollup merge of #85706 - jrmuizel:fpe, r=nagisa
Yuki Okushi [Thu, 3 Jun 2021 05:35:28 +0000 (14:35 +0900)]
Rollup merge of #85706 - jrmuizel:fpe, r=nagisa

Turn off frame pointer elimination on all Apple platforms.

This ends up disabling frame pointer elimination on aarch64_apple_darwin
which matches what clang does by default along with the
aarch64_apple_ios and x86_64_apple_darwin targets.

Further, the Apple docs "Writing ARM64 Code for Apple Platforms" has a section
called "Respect the Purpose of Specific CPU Registers" which
specifically calls out the frame pointer register (x29):

   The frame pointer register (x29) must always address a valid frame
   record. Some functions — such as leaf functions or tail calls — may
   opt not to create an entry in this list As a result, stack traces
   are always meaningful, even without debug information.

Other platforms are updated to not override the default.

3 years agoRollup merge of #83362 - SOF3:stab/vecdeque-binary-search, r=m-ou-se
Yuki Okushi [Thu, 3 Jun 2021 05:35:27 +0000 (14:35 +0900)]
Rollup merge of #83362 - SOF3:stab/vecdeque-binary-search, r=m-ou-se

Stabilize `vecdeque_binary_search`

This PR stabilizes the feature `vecdeque_binary_search` as tracked in #78021.

The tracking issue has not received any comments for the past 5 months, and concerns have been raised neither in the RFC rust-lang/rfcs#2997 nor in the tracking issue #78021.

3 years agoAuto merge of #84834 - GuillaumeGomez:sidebar-unification, r=jsha
bors [Thu, 3 Jun 2021 02:31:44 +0000 (02:31 +0000)]
Auto merge of #84834 - GuillaumeGomez:sidebar-unification, r=jsha

Sidebar unification

This PR does a few things:
 * Put crates list at all levels (before, it was only on the "top" items)
 * Fix bug in module sidebar: the list of items was from the parent module.

The other changes (on bootstrap mostly) were to allow to generate multiple crates in a same folder so that we can ensure that clicking on the crates in the sidebar works as expected.

I added a rustdoc-gui test to ensure everything is where it should be.

r? `@jyn514`

3 years agoAuto merge of #84703 - GuillaumeGomez:cleanup-dom, r=jsha
bors [Wed, 2 Jun 2021 23:11:41 +0000 (23:11 +0000)]
Auto merge of #84703 - GuillaumeGomez:cleanup-dom, r=jsha

Clean up dom

The commits come from #84480.

They were errors reported by the `tidy` script that we will use to ensure that the HTML generated by rustdoc is valid.

I checked carefully that there were no difference so in principle it should be exactly the same rendering but a double-check would be very appreciated in case I missed something.

Extra note: `<h4>` and some `<h3>` tags were replaced by `<div>` because they're not supposed to contain tags as they currently do.

r? `@jsha`

3 years agoAuto merge of #85904 - cjgillot:one-name, r=petrochenkov
bors [Wed, 2 Jun 2021 20:23:37 +0000 (20:23 +0000)]
Auto merge of #85904 - cjgillot:one-name, r=petrochenkov

Restrict access to crate_name.

Also remove original_crate_name, which had the exact same implementation.

Part of #85153

3 years agoReplace h3 for notable traits with div
Guillaume Gomez [Wed, 2 Jun 2021 19:16:33 +0000 (21:16 +0200)]
Replace h3 for notable traits with div

3 years agoStabilize VecDeque::partition_point.
Mara Bos [Wed, 2 Jun 2021 18:51:23 +0000 (20:51 +0200)]
Stabilize VecDeque::partition_point.

3 years agoBump vecdeque_binary_search stabilization to 1.54.
Mara Bos [Wed, 2 Jun 2021 18:51:08 +0000 (20:51 +0200)]
Bump vecdeque_binary_search stabilization to 1.54.

3 years agoBumped `vecdeque_binary_search` stabilization version to 1.53.0
SOFe [Mon, 22 Mar 2021 02:58:06 +0000 (10:58 +0800)]
Bumped `vecdeque_binary_search` stabilization version to 1.53.0

3 years agoStabilize `vecdeque_binary_search`
SOFe [Mon, 22 Mar 2021 02:46:18 +0000 (10:46 +0800)]
Stabilize `vecdeque_binary_search`

3 years agoUpdate rustdoc tests
Guillaume Gomez [Wed, 2 Jun 2021 08:59:10 +0000 (10:59 +0200)]
Update rustdoc tests

3 years agoRemove data-level selectors from CSS.
Jacob Hoffman-Andrews [Wed, 2 Jun 2021 04:43:09 +0000 (21:43 -0700)]
Remove data-level selectors from CSS.

3 years agoTurn off frame pointer elimination on all Apple platforms.
Jeff Muizelaar [Wed, 2 Jun 2021 17:48:42 +0000 (13:48 -0400)]
Turn off frame pointer elimination on all Apple platforms.

This ends up disabling frame pointer elimination on aarch64_apple_darwin
which matches what clang does by default along with the
aarch64_apple_ios and x86_64_apple_darwin targets.

Further, the Apple docs "Writing ARM64 Code for Apple Platforms" has a section
called "Respect the Purpose of Specific CPU Registers" which
specifically calls out the frame pointer register (x29):

   The frame pointer register (x29) must always address a valid frame
   record. Some functions — such as leaf functions or tail calls — may
   opt not to create an entry in this list As a result, stack traces
   are always meaningful, even without debug information.

Other platforms are updated to not override the default.

3 years agoRestrict access to crate_name.
Camille GILLOT [Mon, 10 May 2021 16:23:32 +0000 (18:23 +0200)]
Restrict access to crate_name.

Also remove original_crate_name, which had the exact same implementation

3 years agoAuto merge of #85337 - cjgillot:less-anon, r=michaelwoerister
bors [Wed, 2 Jun 2021 13:11:41 +0000 (13:11 +0000)]
Auto merge of #85337 - cjgillot:less-anon, r=michaelwoerister

Avoid creating anonymous nodes with zero or one dependency.

Anonymous nodes are only useful to encode dependencies, and cannot be replayed from one compilation session to another.
As such, anonymous nodes without dependency are always green.
Anonymous nodes with only one dependency are equivalent to this dependency.

cc #45408
cc `@michaelwoerister`

3 years agoAuto merge of #85892 - tmiasko:i, r=oli-obk
bors [Wed, 2 Jun 2021 10:47:58 +0000 (10:47 +0000)]
Auto merge of #85892 - tmiasko:i, r=oli-obk

Miscellaneous inlining improvements

3 years agoAuto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011
bors [Wed, 2 Jun 2021 08:06:45 +0000 (08:06 +0000)]
Auto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011

Make is_private_dep a query.

Part of #85153

r? `@Aaron1011`

3 years agoMiscellaneous inlining improvements
Tomasz Miąsko [Tue, 1 Jun 2021 00:00:00 +0000 (00:00 +0000)]
Miscellaneous inlining improvements

3 years agoAuto merge of #85905 - cjgillot:one-trait-map, r=Aaron1011
bors [Wed, 2 Jun 2021 05:25:41 +0000 (05:25 +0000)]
Auto merge of #85905 - cjgillot:one-trait-map, r=Aaron1011

Only compute the trait map once

Part of #85153

r? `@Aaron1011`

3 years agoAuto merge of #85687 - m-ou-se:new-prelude, r=yaahc
bors [Wed, 2 Jun 2021 02:36:44 +0000 (02:36 +0000)]
Auto merge of #85687 - m-ou-se:new-prelude, r=yaahc

New prelude

RFC: rust-lang/rfcs#3114
Tracking issue: https://github.com/rust-lang/rust/issues/85684

3 years agoconvert Rvalue::threadlocalref assertion to delay bug
csmoe [Tue, 1 Jun 2021 14:05:04 +0000 (22:05 +0800)]
convert Rvalue::threadlocalref assertion to delay bug

3 years agoAuto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011
bors [Tue, 1 Jun 2021 23:02:52 +0000 (23:02 +0000)]
Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011

Make rustc_dirty/clean annotations exhaustive by default

Fixes #45009

3 years agoAuto merge of #85829 - bjorn3:simplify_crate_num, r=jackh726
bors [Tue, 1 Jun 2021 20:09:03 +0000 (20:09 +0000)]
Auto merge of #85829 - bjorn3:simplify_crate_num, r=jackh726

Remove CrateNum::ReservedForIncrCompCache

It's only use is easily replaceable with `Option<CrateNum>`.

3 years agoMake trait_map an Option.
Camille GILLOT [Tue, 1 Jun 2021 19:50:06 +0000 (21:50 +0200)]
Make trait_map an Option.

3 years agoMake the reasoning more explicit.
Camille GILLOT [Tue, 1 Jun 2021 19:46:30 +0000 (21:46 +0200)]
Make the reasoning more explicit.

3 years agoAvoid creating anonymous nodes with zero or one dependency.
Camille GILLOT [Sat, 15 May 2021 15:23:16 +0000 (17:23 +0200)]
Avoid creating anonymous nodes with zero or one dependency.

3 years agoDon't generate impl-items div container if there is none
Guillaume Gomez [Tue, 1 Jun 2021 19:36:03 +0000 (21:36 +0200)]
Don't generate impl-items div container if there is none

3 years agoRemove invalid usage of aria-level
Guillaume Gomez [Mon, 10 May 2021 14:38:41 +0000 (16:38 +0200)]
Remove invalid usage of aria-level

3 years agoReplace h3 and h4 containing invalid DOM
Guillaume Gomez [Fri, 23 Apr 2021 20:15:57 +0000 (22:15 +0200)]
Replace h3 and h4 containing invalid DOM

3 years agoAdd missing <title> in redirection page <head>
Guillaume Gomez [Fri, 23 Apr 2021 15:47:50 +0000 (17:47 +0200)]
Add missing <title> in redirection page <head>

3 years agoReplace empty href with "#"
Guillaume Gomez [Fri, 23 Apr 2021 15:10:23 +0000 (17:10 +0200)]
Replace empty href with "#"

3 years agoMake is_private_dep a query.
Camille GILLOT [Tue, 11 May 2021 20:06:07 +0000 (22:06 +0200)]
Make is_private_dep a query.

3 years agoRename take_trait_map.
Camille GILLOT [Sat, 29 May 2021 21:10:04 +0000 (23:10 +0200)]
Rename take_trait_map.

3 years agoCheck that trait_map is not moved twice.
Camille GILLOT [Sat, 29 May 2021 20:56:23 +0000 (22:56 +0200)]
Check that trait_map is not moved twice.

3 years agoRemove StableVec.
Camille GILLOT [Tue, 11 May 2021 08:38:54 +0000 (10:38 +0200)]
Remove StableVec.

3 years agoOnly compute the trait_map once.
Camille GILLOT [Sun, 4 Apr 2021 12:24:27 +0000 (14:24 +0200)]
Only compute the trait_map once.

3 years agoAdd test for forward declared const param defaults
Ellen [Tue, 1 Jun 2021 16:44:49 +0000 (17:44 +0100)]
Add test for forward declared const param defaults

3 years agoUpdate unsound label for triagebot
Frank Steffahn [Tue, 1 Jun 2021 16:26:42 +0000 (18:26 +0200)]
Update unsound label for triagebot

3 years agoFix test
bjorn3 [Tue, 1 Jun 2021 15:00:54 +0000 (17:00 +0200)]
Fix test

3 years agoAuto merge of #85886 - GuillaumeGomez:rollup-l3yr3np, r=GuillaumeGomez
bors [Tue, 1 Jun 2021 12:10:15 +0000 (12:10 +0000)]
Auto merge of #85886 - GuillaumeGomez:rollup-l3yr3np, r=GuillaumeGomez

Rollup of 4 pull requests

Successful merges:

 - #85473 (fix split-debuginfo error message)
 - #85622 (Remove toggle for "undocumented items.")
 - #85826 (Mention "null pointer optimization" in option docs.)
 - #85860 (Fix details rustdoc toggle for blanket impl)

Failed merges:

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

3 years agoRollup merge of #85860 - pickfire:patch-5, r=GuillaumeGomez
Guillaume Gomez [Tue, 1 Jun 2021 09:29:45 +0000 (11:29 +0200)]
Rollup merge of #85860 - pickfire:patch-5, r=GuillaumeGomez

Fix details rustdoc toggle for blanket impl

In the meantime, allow all of the details to have the same top.

Before

![image](https://user-images.githubusercontent.com/4687791/120214139-a673ed00-c266-11eb-9154-3a8148199c8f.png)
![image](https://user-images.githubusercontent.com/4687791/120214232-c5727f00-c266-11eb-8bda-871e6e04819e.png)

After

![image](https://user-images.githubusercontent.com/4687791/120214121-9d831b80-c266-11eb-8c33-db1317c42375.png)
![image](https://user-images.githubusercontent.com/4687791/120214273-d4f1c800-c266-11eb-89ee-0f2b7c2e5bdb.png)

I stumbled across this while wanting to do a details button for the layout.

3 years agoRollup merge of #85826 - jsha:npo, r=joshtriplett
Guillaume Gomez [Tue, 1 Jun 2021 09:29:44 +0000 (11:29 +0200)]
Rollup merge of #85826 - jsha:npo, r=joshtriplett

Mention "null pointer optimization" in option docs.

I had seen people discuss "null pointer optimization," but when I tried to find official documentation (using Google), the `std::option` page didn't show up, because it doesn't use that term. Hopefully adding the term will help others find it in the future.

3 years agoRollup merge of #85622 - jsha:untoggle-undocumented, r=GuillaumeGomez
Guillaume Gomez [Tue, 1 Jun 2021 09:29:43 +0000 (11:29 +0200)]
Rollup merge of #85622 - jsha:untoggle-undocumented, r=GuillaumeGomez

Remove toggle for "undocumented items."

Per discussion in #84326. For trait implementations, this was
misleading: the items actually do have documentation (but it comes from
the trait definition).

For both trait implementations and trait implementors, this was
redundant: in both of those cases, the items are default-hidden by
different toggle at the level above.

Update tests: Remove XPath selectors that over-specified on details tag,
in cases that weren't testing toggles. Add an explicit test for toggles
on methods. Rename item-hide-threshold to toggle-item-contents for
consistency.

Demo:
https://hoffman-andrews.com/rust/untoggle-undocumented/std/string/struct.String.html
https://hoffman-andrews.com/rust/untoggle-undocumented/std/io/trait.Read.html

3 years agoRollup merge of #85473 - infinity0:master, r=jackh726
Guillaume Gomez [Tue, 1 Jun 2021 09:29:42 +0000 (11:29 +0200)]
Rollup merge of #85473 - infinity0:master, r=jackh726

fix split-debuginfo error message

3 years agoAuto merge of #85884 - rust-lang:revert-85153-qresolve, r=michaelwoerister
bors [Tue, 1 Jun 2021 09:22:01 +0000 (09:22 +0000)]
Auto merge of #85884 - rust-lang:revert-85153-qresolve, r=michaelwoerister

Revert "Reduce the amount of untracked state in TyCtxt"

Reverts rust-lang/rust#85153
Fixes https://github.com/rust-lang/rust/issues/85878

The performance hit is massive, and was not visible in the in-review perf run.

r? `@Aaron1011`

3 years agoRevert "Reduce the amount of untracked state in TyCtxt"
Camille Gillot [Tue, 1 Jun 2021 07:05:22 +0000 (09:05 +0200)]
Revert "Reduce the amount of untracked state in TyCtxt"

3 years agoAuto merge of #85859 - pickfire:patch-3, r=CraftSpider
bors [Tue, 1 Jun 2021 06:40:57 +0000 (06:40 +0000)]
Auto merge of #85859 - pickfire:patch-3, r=CraftSpider

Add title for copy to clipboard button in rustdoc

This button
![image](https://user-images.githubusercontent.com/4687791/120210874-da4d1380-c262-11eb-9987-9145c4354029.png)

3 years agoskip check_static on rvalue::threadlocalref
csmoe [Tue, 1 Jun 2021 05:59:17 +0000 (13:59 +0800)]
skip check_static on rvalue::threadlocalref

3 years agoAuto merge of #85856 - lnicola:rust-analyzer-2021-05-31, r=jonas-schievink
bors [Tue, 1 Jun 2021 04:01:10 +0000 (04:01 +0000)]
Auto merge of #85856 - lnicola:rust-analyzer-2021-05-31, r=jonas-schievink

:arrow_up: rust-analyzer

3 years agoIntra doc link-ify a reference to a function
est31 [Tue, 1 Jun 2021 03:04:48 +0000 (05:04 +0200)]
Intra doc link-ify a reference to a function

3 years agoAuto merge of #85153 - cjgillot:qresolve, r=Aaron1011
bors [Tue, 1 Jun 2021 00:51:00 +0000 (00:51 +0000)]
Auto merge of #85153 - cjgillot:qresolve, r=Aaron1011

Reduce the amount of untracked state in TyCtxt

Access to untracked global state may generate instances of #84970.

The GlobalCtxt contains the lowered HIR, the resolver outputs and interners.
By wrapping the resolver inside a query, we make sure those accesses are properly tracked.
As a no_hash query, all dependent queries essentially become `eval_always`,
what they should have been from the beginning.

3 years agoAuto merge of #85866 - Aaron1011:miriup-const-err, r=RalfJung
bors [Mon, 31 May 2021 22:33:54 +0000 (22:33 +0000)]
Auto merge of #85866 - Aaron1011:miriup-const-err, r=RalfJung

Bump Miri for const_err changes

Fixes https://github.com/rust-lang/rust/issues/85861
r? `@RalfJung`

3 years agoAuto merge of #85702 - Aaron1011:no-vec-sort, r=michaelwoerister
bors [Mon, 31 May 2021 20:03:18 +0000 (20:03 +0000)]
Auto merge of #85702 - Aaron1011:no-vec-sort, r=michaelwoerister

Don't sort a `Vec` before computing its `DepTrackingHash`

Previously, we sorted the vec prior to hashing, making the hash
independent of the original (command-line argument) order. However, the
original vec was still always kept in the original order, so we were
relying on the rest of the compiler always working with it in an
'order-independent' way.

This assumption was not being upheld by the `native_libraries` query -
the order of the entires in its result depends on the order of entries
in `Options.libs`. This lead to an 'unstable fingerprint' ICE when the
`-l` arguments were re-ordered.

This PR removes the sorting logic entirely. Re-ordering command-line
arguments (without adding/removing/changing any arguments) seems like a
really niche use case, and correctly optimizing for it would require
additional work. By always hashing arguments in their original order, we
can entirely avoid a cause of 'unstable fingerprint' errors.

3 years agoBump Miri for const_err changes
Aaron Hill [Mon, 31 May 2021 16:53:46 +0000 (11:53 -0500)]
Bump Miri for const_err changes

r? @RalfJung

3 years agoAuto merge of #85814 - steffahn:fix_linked_list_itermut_debug, r=m-ou-se
bors [Mon, 31 May 2021 15:22:51 +0000 (15:22 +0000)]
Auto merge of #85814 - steffahn:fix_linked_list_itermut_debug, r=m-ou-se

Fix unsoundness of Debug implementation for linked_list::IterMut

Fix #85813, new `marker` field follows the example of `linked_list::Iter`.

3 years agoFix details rustdoc toggle for blanket impl
Ivan Tham [Mon, 31 May 2021 15:18:53 +0000 (23:18 +0800)]
Fix details rustdoc toggle for blanket impl

In the meantime, allow all of the details to have the same top.

3 years agoAdd title for copy to clipboard button in rustdoc
Ivan Tham [Mon, 31 May 2021 14:51:59 +0000 (22:51 +0800)]
Add title for copy to clipboard button in rustdoc

3 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Mon, 31 May 2021 13:53:42 +0000 (16:53 +0300)]
:arrow_up: rust-analyzer

3 years agoImprove display of the separation between page items and siblings in the sidebar
Guillaume Gomez [Mon, 31 May 2021 10:11:05 +0000 (12:11 +0200)]
Improve display of the separation between page items and siblings in the sidebar

3 years agoOnly list crates on the crate page
Guillaume Gomez [Mon, 31 May 2021 09:51:22 +0000 (11:51 +0200)]
Only list crates on the crate page

3 years agoAuto merge of #85704 - Aaron1011:const-panic-hard-err, r=RalfJung
bors [Mon, 31 May 2021 12:41:55 +0000 (12:41 +0000)]
Auto merge of #85704 - Aaron1011:const-panic-hard-err, r=RalfJung

Emit a hard error when a panic occurs during const-eval

Previous, a panic during const evaluation would go through the
`const_err` lint. This PR ensures that such a panic always causes
compilation to fail.

3 years agoClarify meaning of MachineApplicable suggestions.
Mara Bos [Mon, 31 May 2021 11:24:16 +0000 (13:24 +0200)]
Clarify meaning of MachineApplicable suggestions.

3 years agoAuto merge of #85266 - cjgillot:hir-dep-clean, r=michaelwoerister
bors [Mon, 31 May 2021 10:13:46 +0000 (10:13 +0000)]
Auto merge of #85266 - cjgillot:hir-dep-clean, r=michaelwoerister

Remove obsolete workaround.

The regression test for #62649 appears to pass even without the workaround.

3 years agoRemove unneeded file to load sidebar items at crate level
Guillaume Gomez [Fri, 28 May 2021 13:43:15 +0000 (15:43 +0200)]
Remove unneeded file to load sidebar items at crate level

3 years agoUpdate rustdoc test
Guillaume Gomez [Mon, 3 May 2021 19:47:32 +0000 (21:47 +0200)]
Update rustdoc test

3 years agoAdd some commented options that could be useful for other contributors in rustdoc...
Guillaume Gomez [Sun, 2 May 2021 19:58:13 +0000 (21:58 +0200)]
Add some commented options that could be useful for other contributors in rustdoc-gui tool

3 years agoAdd sidebar GUI tests
Guillaume Gomez [Sun, 2 May 2021 16:59:31 +0000 (18:59 +0200)]
Add sidebar GUI tests

3 years ago* Put crates list at all levels
Guillaume Gomez [Sun, 2 May 2021 14:35:48 +0000 (16:35 +0200)]
* Put crates list at all levels
* Fix bug in module sidebar: the list of items was from the parent module

3 years agoAuto merge of #85395 - 12101111:build-crt, r=petrochenkov
bors [Mon, 31 May 2021 07:32:50 +0000 (07:32 +0000)]
Auto merge of #85395 - 12101111:build-crt, r=petrochenkov

Build crtbegin.o/crtend.o from source code

Build crtbengin.o/crtend.o from source code instead of copying from gcc.

The crtbegin and crtend implementation from llvm don't need `crtbeginS.o` for PIC. `crtbegin{,S,T}.o` is unified into one generic `crtbegin.o`. See the comments in https://reviews.llvm.org/D28791#1419436 and https://reviews.llvm.org/D28791#1420914

fix: https://github.com/rust-lang/rust/issues/85310 , fix: https://github.com/rust-lang/rust/issues/47551 , fix: https://github.com/rust-lang/rust/issues/84033

3 years agoAuto merge of #85819 - CDirkx:is_unicast_link_local_strict, r=joshtriplett
bors [Mon, 31 May 2021 05:03:26 +0000 (05:03 +0000)]
Auto merge of #85819 - CDirkx:is_unicast_link_local_strict, r=joshtriplett

Remove `Ipv6Addr::is_unicast_link_local_strict`

Removes the unstable method `Ipv6Addr::is_unicast_link_local_strict` and keeps the behaviour of `Ipv6Addr::is_unicast_link_local`, see also #85604 where I have tried to summarize related discussion so far.

My intent is for `is_unicast_link_local`, `is_unicast_site_local` and `is_unicast_global` to have the semantics of checking if an address has Link-Local, Site-Local or Global scope, see also #85696 which changes the behaviour of `is_unicast_global` and renames these methods to `has_unicast_XXX_scope` to reflect this.

For checking Link-Local scope we currently have two methods: `is_unicast_link_local` and `is_unicast_link_local_strict`. This is because of what appears to be conflicting definitions in [IETF RFC 4291](https://datatracker.ietf.org/doc/html/rfc4291).

From [IETF RFC 4291 section 2.4](https://datatracker.ietf.org/doc/html/rfc4291#section-2.4): "Link-Local unicast" (`FE80::/10`)
```text
Address type         Binary prefix        IPv6 notation   Section
------------         -------------        -------------   -------
Unspecified          00...0  (128 bits)   ::/128          2.5.2
Loopback             00...1  (128 bits)   ::1/128         2.5.3
Multicast            11111111             FF00::/8        2.7
Link-Local unicast   1111111010           FE80::/10       2.5.6
Global Unicast       (everything else)
```

From [IETF RFC 4291 section 2.5.6](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.6): "Link-Local IPv6 Unicast Addresses" (`FE80::/64`)
```text
| 10 bits  |         54 bits         |          64 bits           |
+----------+-------------------------+----------------------------+
|1111111010|           0             |       interface ID         |
+----------+-------------------------+----------------------------+
```

With `is_unicast_link_local` checking `FE80::/10` and `is_unicast_link_local_strict` checking `FE80::/64`.

There is also [IETF RFC 5156 section 2.4](https://datatracker.ietf.org/doc/html/rfc5156#section-2.4) which defines "Link-Scoped Unicast" as `FE80::/10`.

It has been pointed out that implementations in other languages and the linux kernel all use `FE80::/10` (https://github.com/rust-lang/rust/pull/76098#issuecomment-706916840, https://github.com/rust-lang/rust/pull/76098#issuecomment-705928605).

Given all of this I believe the correct interpretation to be the following: All addresses in `FE80::/10` are defined as having Link-Local scope, however currently only the block `FE80::/64` has been allocated for "Link-Local IPv6 Unicast Addresses". This might change in the future however; more addresses in `FE80::/10` could be allocated and those will have Link-Local scope. I therefore believe the current behaviour of `is_unicast_link_local` to be correct (if interpreting it to have the semantics of `has_unicast_link_local_scope`) and `is_unicast_link_local_strict` to be unnecessary, confusing and even a potential source of future bugs:

Currently there is no real difference in checking `FE80::/10` or `FE80::/64`, since any address in practice will be `FE80::/64`. However if an application uses `is_unicast_link_local_strict` to implement link-local (so non-global) behaviour, it will be incorrect in the future if addresses outside of `FE80::/64` are allocated.

r? `@joshtriplett` as reviewer of all the related PRs

3 years agoRemove toggle for "undocumented items."
Jacob Hoffman-Andrews [Sun, 23 May 2021 15:09:39 +0000 (08:09 -0700)]
Remove toggle for "undocumented items."

Per discussion in #84326. For trait implementations, this was
misleading: the items actually do have documentation (but it comes from
the trait definition).

For both trait implementations and trait implementors, this was
redundant: in both of those cases, the items are default-hidden by
different toggle at the level above.

Update tests: Remove XPath selectors that over-specified on details tag,
in cases that weren't testing toggles. Add an explicit test for toggles
on methods. Rename item-hide-threshold to toggle-item-contents for
consistency.

3 years agoBuild crtbengin.o/crtend.o from source code
12101111 [Mon, 17 May 2021 03:22:07 +0000 (11:22 +0800)]
Build crtbengin.o/crtend.o from source code

3 years agoAuto merge of #85597 - 0yoyoyo:fix-issue-71563-remove-redundant-args, r=petrochenkov
bors [Mon, 31 May 2021 01:59:20 +0000 (01:59 +0000)]
Auto merge of #85597 - 0yoyoyo:fix-issue-71563-remove-redundant-args, r=petrochenkov

Fix span of redundant generic arguments

Fixes #71563

Above issue is about lifetime arguments, but generic arguments also have same problem.
This PR fixes both help messages.

3 years agoAuto merge of #85559 - 12101111:sanitizer-crt-static, r=nagisa
bors [Sun, 30 May 2021 23:38:10 +0000 (23:38 +0000)]
Auto merge of #85559 - 12101111:sanitizer-crt-static, r=nagisa

Diagnose use sanitizers with crt-static

Fix: https://github.com/rust-lang/rust/issues/85459

3 years agoAuto merge of #85838 - GuillaumeGomez:rollup-rk2rh7m, r=GuillaumeGomez
bors [Sun, 30 May 2021 20:20:44 +0000 (20:20 +0000)]
Auto merge of #85838 - GuillaumeGomez:rollup-rk2rh7m, r=GuillaumeGomez

Rollup of 8 pull requests

Successful merges:

 - #85285 (Add eslint checks to CI)
 - #85709 (Use correct edition when parsing `:pat` matchers)
 - #85762 (Do not try to build LLVM with Zlib on Windows)
 - #85770 (Remove `--print unversioned-files` from rustdoc )
 - #85781 (Add documentation for aarch64-apple-ios-sim target)
 - #85801 (Add `String::extend_from_within`)
 - #85817 (Fix a typo)
 - #85818 (Don't drop `PResult` without handling the error)

Failed merges:

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

3 years agoRollup merge of #85818 - LeSeulArtichaut:85794-diag-drop-ice, r=petrochenkov
Guillaume Gomez [Sun, 30 May 2021 19:06:53 +0000 (21:06 +0200)]
Rollup merge of #85818 - LeSeulArtichaut:85794-diag-drop-ice, r=petrochenkov

Don't drop `PResult` without handling the error

Fixes #85794.

3 years agoRollup merge of #85817 - r00ster91:patch-9, r=dtolnay
Guillaume Gomez [Sun, 30 May 2021 19:06:52 +0000 (21:06 +0200)]
Rollup merge of #85817 - r00ster91:patch-9, r=dtolnay

Fix a typo

See also: #85737

3 years agoRollup merge of #85801 - WaffleLapkin:master, r=joshtriplett
Guillaume Gomez [Sun, 30 May 2021 19:06:51 +0000 (21:06 +0200)]
Rollup merge of #85801 - WaffleLapkin:master, r=joshtriplett

Add `String::extend_from_within`

This PR adds `String::extend_from_within` function under the `string_extend_from_within` feature gate similar to the [`Vec::extend_from_within`] function.

```rust
// String
pub fn extend_from_within<R>(&mut self, src: R)
where
    R: RangeBounds<usize>;
```

[`Vec::extend_from_within`]: https://github.com/rust-lang/rust/issues/81656

3 years agoRollup merge of #85781 - badboy:document-aarch-ios-sim-support, r=Amanieu
Guillaume Gomez [Sun, 30 May 2021 19:06:47 +0000 (21:06 +0200)]
Rollup merge of #85781 - badboy:document-aarch-ios-sim-support, r=Amanieu

Add documentation for aarch64-apple-ios-sim target

Documentation as requested for [MCP 428](https://github.com/rust-lang/compiler-team/issues/428) to promote this target to Tier 2.

Currently it calls out that it's Tier 3. That should be changed if this target is promoted, but this PR could also land before that.

Note: probably should get signoff from the compiler team based on that MCP.

3 years agoRollup merge of #85770 - Bobo1239:set_locale_for_sort, r=jyn514
Guillaume Gomez [Sun, 30 May 2021 19:06:46 +0000 (21:06 +0200)]
Rollup merge of #85770 - Bobo1239:set_locale_for_sort, r=jyn514

Remove `--print unversioned-files` from rustdoc

This flag isn't needed anymore. See #83784.

3 years agoRollup merge of #85762 - mati865:disable-zlib-on-windows, r=Mark-Simulacrum
Guillaume Gomez [Sun, 30 May 2021 19:06:45 +0000 (21:06 +0200)]
Rollup merge of #85762 - mati865:disable-zlib-on-windows, r=Mark-Simulacrum

Do not try to build LLVM with Zlib on Windows

Fixes https://github.com/rust-lang/rust/issues/85422
Fixes https://github.com/rust-lang/rust/issues/85624

We do not install Zlib on the CI but recent builds somehow started picking it's shared version.
To avoid relying on CI binaries so let's explicitly disable it.

3 years agoRollup merge of #85709 - Aaron1011:fix-pat-crate-edition, r=petrochenkov
Guillaume Gomez [Sun, 30 May 2021 19:06:44 +0000 (21:06 +0200)]
Rollup merge of #85709 - Aaron1011:fix-pat-crate-edition, r=petrochenkov

Use correct edition when parsing `:pat` matchers

As described in issue #85708, we currently do not properly decode
`SyntaxContext::root()` and `ExpnId::root()` from foreign crates. As a
result, when we decode a span from a foreign crate with
`SyntaxContext::root()`, we end up up considering it to have the edition
of the *current* crate, instead of the foreign crate where it was
originally created.

A full fix for this issue will be a fairly significant undertaking.
Fortunately, it's possible to implement a partial fix, which gives us
the correct edition-dependent behavior for `:pat` matchers when the
macro is loaded from another crate. Since we have the edition of the
macro's defining crate available, we can 'recover' from seeing a
`SyntaxContext::root()` and use the edition of the macro's defining
crate.

Any solution to issue #85708 must reproduce the behavior of this
targeted fix - properly preserving a foreign `SyntaxContext::root()`
means (among other things) preserving its edition, which by definition
is the edition of the foreign crate itself. Therefore, this fix moves us
closer to the correct overall solution, and does not expose any new
incorrect behavior to macros.

3 years agoRollup merge of #85285 - GuillaumeGomez:eslint-check, r=jsha,Mark-Simulacrum
Guillaume Gomez [Sun, 30 May 2021 19:06:43 +0000 (21:06 +0200)]
Rollup merge of #85285 - GuillaumeGomez:eslint-check, r=jsha,Mark-Simulacrum

Add eslint checks to CI

It also allowed me to fix some potential issues that went unnoticed. Having this process automated will hopefully prevent us to add more errors. :)

cc `@Mark-Simulacrum` (for the add in the CI).
r? `@jsha`

3 years agoFix eslint error in sidebar-items.js
Guillaume Gomez [Sun, 30 May 2021 18:20:59 +0000 (20:20 +0200)]
Fix eslint error in sidebar-items.js

3 years agoAdd eslint checks in CI
Guillaume Gomez [Fri, 14 May 2021 11:41:19 +0000 (13:41 +0200)]
Add eslint checks in CI

3 years agoRename take_trait_map.
Camille GILLOT [Sat, 29 May 2021 21:10:04 +0000 (23:10 +0200)]
Rename take_trait_map.

3 years agoCheck that trait_map is not moved twice.
Camille GILLOT [Sat, 29 May 2021 20:56:23 +0000 (22:56 +0200)]
Check that trait_map is not moved twice.

3 years agoDrop metadata_encoding_version.
Camille GILLOT [Sat, 29 May 2021 20:49:59 +0000 (22:49 +0200)]
Drop metadata_encoding_version.

3 years agoBless tests.
Camille GILLOT [Thu, 20 May 2021 20:21:59 +0000 (22:21 +0200)]
Bless tests.

3 years agoCorrect comments about untracked accesses.
Camille GILLOT [Thu, 20 May 2021 18:17:45 +0000 (20:17 +0200)]
Correct comments about untracked accesses.

3 years agoMake is_private_dep a query.
Camille GILLOT [Tue, 11 May 2021 20:06:07 +0000 (22:06 +0200)]
Make is_private_dep a query.

3 years agoMake allocator_kind a query.
Camille GILLOT [Tue, 11 May 2021 20:05:54 +0000 (22:05 +0200)]
Make allocator_kind a query.

3 years agoAvoid a clone of output_filenames.
Camille GILLOT [Tue, 11 May 2021 13:03:53 +0000 (15:03 +0200)]
Avoid a clone of output_filenames.

3 years agoRemove StableVec.
Camille GILLOT [Tue, 11 May 2021 08:38:54 +0000 (10:38 +0200)]
Remove StableVec.