Commit Graph

164065 Commits

Author SHA1 Message Date
bors
d53e19540e Auto merge of #94668 - fee1-dead:rollup-8e92bht, r=fee1-dead
Rollup of 3 pull requests

Successful merges:

 - #92509 (doc: `Iterator::partition` use partial type hints)
 - #94621 (rustbuild: support RelWithDebInfo for lld)
 - #94649 (Unix path::absolute: Fix leading "." component)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-06 12:57:32 +00:00
fee1-dead
8ea3f236dc
Rollup merge of #94649 - ChrisDenton:unix-absolute-fix, r=Dylan-DPC
Unix path::absolute: Fix leading "." component

Testing leading `.` and `..` components were missing from the unix tests.

This PR adds them and fixes the leading `.` case. It also fixes the test cases so that they do an exact comparison.

This problem reported by ``@axetroy``
2022-03-06 22:35:31 +11:00
fee1-dead
02e8839cbd
Rollup merge of #94621 - ridwanabdillahi:lld-rel-dbg, r=Mark-Simulacrum
rustbuild: support RelWithDebInfo for lld

r? ``@alexcrichton``

LLVM has flags that control the level of debuginfo generated when building via rustbuild. Since LLD is built separately, it currently has no way of generating any debuginfo. This change re-uses the same flags as LLVM for LLD to ensure it has the same level of debuginfo generated as LLVM.
2022-03-06 22:35:30 +11:00
fee1-dead
d85e4b1e35
Rollup merge of #92509 - Gentoli:partition-ex, r=camelid
doc: `Iterator::partition` use partial type hints

Switch to partial type hints to indicate only the collection type is needed.
2022-03-06 22:35:29 +11:00
bors
ad0d1d71d3 Auto merge of #90076 - jackh726:wherethewhere, r=nikomatsakis
Change location of where clause on GATs

Closes #89122

~Blocked on lang FCP~

r? `@nikomatsakis`
2022-03-06 07:22:09 +00:00
bors
5d9d1e8891 Auto merge of #94658 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/94562
r? `@ghost`
2022-03-06 04:41:25 +00:00
Ralf Jung
0de698197f update Miri 2022-03-05 22:44:34 -05:00
Jack Huey
d16ec7b9d1 Ignore 2022-03-05 21:20:12 -05:00
bors
1661e4c7e0 Auto merge of #93805 - petrochenkov:doclinkself, r=camelid,GuillaumeGomez
rustdoc: Stop textually replacing `Self` in doc links before resolving them

Resolve it directly to a type / def-id instead.

Also never pass `Self` to `Resolver`, it is useless because it's guaranteed that no resolution will be found.

This is a pre-requisite for https://github.com/rust-lang/rust/issues/83761.
2022-03-06 02:14:49 +00:00
Gentoli
62a65945b7
doc: Iterator::partition use partial type hints 2022-03-05 19:40:40 -05:00
bors
0cbef1c6a7 Auto merge of #94601 - csmoe:android-asan, r=nagisa
add address sanitizer fo android

We have been being using asan to debug the rust/cpp/c mixed android application in production for months: recompile the rust library with a patched rustc, everything just works fine. The patch is really small thanks to `@nagisa` 's refactoring in https://github.com/rust-lang/rust/pull/81866

r? `@nagisa`
2022-03-05 22:52:08 +00:00
bors
c274e4969f Auto merge of #94648 - RalfJung:rollup-4iorcrd, r=RalfJung
Rollup of 4 pull requests

Successful merges:

 - #94630 (Update note about tier 2 docs.)
 - #94633 (Suggest removing a semicolon after derive attributes)
 - #94642 (Fix source code pages scroll)
 - #94645 (do not attempt to open cgroup files under Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-05 19:53:45 +00:00
Jack Huey
9dc05f3832 Add commment covering the case with no where clause 2022-03-05 13:15:00 -05:00
Jack Huey
084c0f36ef Update new tests 2022-03-05 13:15:00 -05:00
Jack Huey
2b151fd5c8 Review changes 2022-03-05 13:15:00 -05:00
Jack Huey
c920eb88b2 Fallback to other where clause if preferred is missing 2022-03-05 13:15:00 -05:00
Jack Huey
3f504f6984 Change to lint 2022-03-05 13:15:00 -05:00
Jack Huey
c20b4f5584 Change syntax for TyAlias where clauses 2022-03-05 13:13:45 -05:00
Chris Denton
0421af9a46
Use as_os_str to compare exact paths 2022-03-05 17:58:08 +00:00
Chris Denton
e8b7371a23
Unix path::absolute: Fix leading "." component
Testing leading `.` and `..` components were missing from the unix tests.
2022-03-05 17:57:12 +00:00
Ralf Jung
00fd87e68a
Rollup merge of #94645 - RalfJung:available-parallelism-miri, r=the8472
do not attempt to open cgroup files under Miri

Since https://github.com/rust-lang/rust/pull/92697, `cargo miri test` always fails under default flags, and one would have to use `MIRIFLAGS=-Zmiri-disable-isolation cargo miri test` instead. This PR fixes that problem.

Cc `@the8472` `@joshtriplett`
2022-03-05 12:53:17 -05:00
Ralf Jung
49d20c4500
Rollup merge of #94642 - GuillaumeGomez:source-code-scroll, r=Urgau
Fix source code pages scroll

To reproduce the bug, go to https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_ast/ast.rs.html#537-541 and click on the `Path` link. The page won't scroll to the content.

r? `@Urgau`
2022-03-05 12:53:17 -05:00
Ralf Jung
e887e6647c
Rollup merge of #94633 - TaKO8Ki:suggest-removing-semicolon-after-derive-attribute, r=cjgillot
Suggest removing a semicolon after derive attributes

closes #93942
2022-03-05 12:53:16 -05:00
Ralf Jung
7143bc301f
Rollup merge of #94630 - ehuss:remove-tier-2-docs-note, r=Mark-Simulacrum
Update note about tier 2 docs.

As of #92800, docs are now available for tier-2 platforms.
2022-03-05 12:53:15 -05:00
bors
ab2bd41ce0 Auto merge of #92123 - m-ou-se:thread-local-cell-methods, r=joshtriplett
Implement RFC 3184 - thread local cell methods

This implements [RFC 3184](https://github.com/rust-lang/rfcs/pull/3184), with `@danielhenrymantilla's` [suggestion](https://github.com/rust-lang/rfcs/pull/3184#issuecomment-965773616) for the `with_` method names.

Tracking issue: https://github.com/rust-lang/rust/issues/92122
2022-03-05 17:13:03 +00:00
Takayuki Maeda
47d91bc9e6 suggest removing a semicolon after derive attributes
use current token span
2022-03-06 01:28:35 +09:00
Ralf Jung
51b4ea2ba1 do not attempt to open cgroup files under Miri 2022-03-05 11:23:25 -05:00
Eric Huss
28bfc56974 Update note about tier 2 docs. 2022-03-05 07:50:40 -08:00
Guillaume Gomez
40e3b6ef42 Add GUI test for source code viewer scroll handling 2022-03-05 16:02:28 +01:00
bors
379e94f5a4 Auto merge of #94480 - bjorn3:no_build_helper, r=Mark-Simulacrum
Remove build_helper

The majority of the code is only used by either rustbuild or
rustc_llvm's build script. Rust_build is compiled once for rustbuild and
once for every stage. This means that the majority of the code in this
crate is needlessly compiled multiple times. By moving only the code
actually used by the respective crates to rustbuild and rustc_llvm's
build script, this needless duplicate compilation is avoided.
2022-03-05 14:32:25 +00:00
Guillaume Gomez
c5275027c3 Scroll when the anchor change and is linking outside of the displayed content 2022-03-05 15:31:57 +01:00
bjorn3
e657da72aa Merge build_helper into util 2022-03-05 15:31:22 +01:00
bjorn3
0cfc3e1016 Remove build_helper
The majority of the code is only used by either rustbuild or
rustc_llvm's build script. Rust_build is compiled once for rustbuild and
once for every stage. This means that the majority of the code in this
crate is needlessly compiled multiple times. By moving only the code
actually used by the respective crates to rustbuild and rustc_llvm's
build script, this needless duplicate compilation is avoided.
2022-03-05 15:31:22 +01:00
bors
c8a49fc902 Auto merge of #94561 - Urgau:check-cfg-lint-help-remove, r=petrochenkov
Improve unexpected_cfgs lint when their is no value expected

This pull-request improve the `unexpected_cfgs` when their is no value expected by suggesting to remove the value.

I also took the liberty to special case it for `feature` as it seems wrong to suggest to remove the value when the problem is most probably the absence of value(s) and also the fact that it doesn't make sense to only have `feature` without a value.

r? `@petrochenkov`
2022-03-05 11:29:59 +00:00
Loïc BRANSTETT
92544f43b0 Improve unexpected_cfgs lint when their is no value expected 2022-03-05 12:11:05 +01:00
Mara Bos
a6e7f26f5a Update tests. 2022-03-05 11:39:03 +01:00
Mara Bos
3b9e214c40 Small fixes in thread local code. 2022-03-05 11:39:03 +01:00
Mara Bos
c68c384b88 Update documentation in thread/local.rs. 2022-03-05 11:39:03 +01:00
Mara Bos
36c904594e Add debug asserts in thread local cell set methods. 2022-03-05 11:39:03 +01:00
Mara Bos
93c409d6e2 Add tracking issue number for local_key_cell_methods. 2022-03-05 11:39:03 +01:00
Mara Bos
88a693c4f4 Rename LocalKey's with_{ref,mut} to with_borrow{,_mut}. 2022-03-05 11:39:03 +01:00
Mara Bos
52ce11996b Implement RFC 3184 - thread local cell methods. 2022-03-05 11:39:03 +01:00
bors
86067bb461 Auto merge of #94546 - JmPotato:std-features-cleanup, r=m-ou-se
Clean up the std library's #![feature]s

Signed-off-by: JmPotato <ghzpotato@gmail.com>

This is part of https://github.com/rust-lang/rust/issues/87766.

r? `@m-ou-se`
2022-03-05 07:26:54 +00:00
bors
be72308b7d Auto merge of #94634 - Dylan-DPC:rollup-8wx1yrj, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #94446 (UNIX `remove_dir_all()`: Try recursing first on the slow path)
 - #94460 (Reenable generator drop tracking tests and fix mutation handling)
 - #94620 (Edit docs on consistency of `PartialOrd` and `PartialEq`)
 - #94624 (Downgrade `#[test]` on macro call to warning)
 - #94626 (Add known-bug directive to issue #47511 test case)
 - #94631 (Fix typo in c-variadic)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-05 04:56:35 +00:00
Dylan DPC
e8a0a4e2af
Rollup merge of #94631 - nebulatgs:patch-1, r=Dylan-DPC
Fix typo in c-variadic

Fixes a typo in the Unstable Book
2022-03-05 04:46:41 +01:00
Dylan DPC
38e3b32dfa
Rollup merge of #94626 - marmeladema:issue-47511-known-bug, r=jackh726
Add known-bug directive to issue #47511 test case
2022-03-05 04:46:40 +01:00
Dylan DPC
e558040908
Rollup merge of #94624 - estebank:regression-94508, r=Dylan-DPC
Downgrade `#[test]` on macro call to warning

Follow up to #92959. Address #94508.
2022-03-05 04:46:39 +01:00
Dylan DPC
a3fe63e9fe
Rollup merge of #94620 - pierwill:partialord-constistency, r=yaahc
Edit docs on consistency of `PartialOrd` and `PartialEq`

Use ordered list to make the information about implementations more readable.
2022-03-05 04:46:38 +01:00
Dylan DPC
c7d200441b
Rollup merge of #94460 - eholk:reenable-drop-tracking-tests, r=tmiasko
Reenable generator drop tracking tests and fix mutation handling

The previous PR, #94068, was overly zealous in counting mutations as borrows, which effectively nullified drop tracking. We would have caught this except the drop tracking tests were still ignored, despite having the option of using the `-Zdrop-tracking` flag now.

This PR fixes the issue introduced by #94068 by only counting mutations as borrows the mutated place has a project. This is sufficient to distinguish `x.y = 42` (which should count as a borrow of `x`) from `x = 42` (which is not a borrow of `x` because the whole variable is overwritten).

This PR also re-enables the drop tracking regression tests using the `-Zdrop-tracking` flag so we will avoid introducing these sorts of issues in the future.

Thanks to ``@tmiasko`` for noticing this problem and pointing it out!

r? ``@tmiasko``
2022-03-05 04:46:37 +01:00
Dylan DPC
3e1e9b4866
Rollup merge of #94446 - rusticstuff:remove_dir_all-illumos-fix, r=cuviper
UNIX `remove_dir_all()`: Try recursing first on the slow path

This only affects the _slow_ code path - if there is no `dirent.d_type` or if it is `DT_UNKNOWN`.

POSIX specifies that calling `unlink()` or `unlinkat(..., 0)` on a directory is allowed to succeed:
> The _path_ argument shall not name a directory unless the process has appropriate privileges and the implementation supports using _unlink()_ on directories.

This however can cause dangling inodes requiring an fsck e.g. on Illumos UFS, so we have to avoid that in the common case. We now just try to recurse into it first and unlink() if we can't open it as a directory.

The other two commits integrate the Macos x86-64 implementation reducing redundancy. Split into two commits for better reviewing.

Fixes #94335.
2022-03-05 04:46:37 +01:00