Commit Graph

150028 Commits

Author SHA1 Message Date
Felix S. Klock II
b894f75594 regression test for issue 82465. 2021-06-10 09:53:23 +00:00
Felix S. Klock II
0deba5546d manually crafted revert of PR #80653, to address issue #82465.
(update: placated tidy)
(update: rebased post PR #84707 )

merge me
2021-06-10 09:48:58 +00:00
1000teslas
2a76762695 gcc-lld mvp
ignore test if rust-lld not found

create ld -> rust-lld symlink at build time instead of run time

for testing in ci

copy instead of symlinking

remove linux check

test for linker, suggestions from bjorn3

fix overly restrictive lld matcher

use -Zgcc-ld flag instead of -Clinker-flavor

refactor code adding lld to gcc path

revert ci changes

suggestions from petrochenkov

rename gcc_ld to gcc-ld in dirs
2021-06-10 17:10:40 +10:00
bors
c5fbcd35a8 Auto merge of #86186 - JohnTitor:rollup-upaw6wx, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #82037 (Make symbols stripping work on MacOS X)
 - #84687 (Multiple improvements to RwLocks)
 - #85997 (rustdoc: Print a warning if the diff when comparing to old nightlies is empty)
 - #86051 (Updated code examples and wording in move keyword documentation )
 - #86111 (fix off by one in `std::iter::Iterator` documentation)
 - #86113 (build doctests with lld if use-lld = true)
 - #86175 (update Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-10 03:11:24 +00:00
Yuki Okushi
3607857756 Make relate_type_and_mut public 2021-06-10 11:48:51 +09:00
Yuki Okushi
a6b7e1c121
Rollup merge of #86175 - RalfJung:miri, r=RalfJung
update Miri

We had some nice PRs land today, let's ship those. :)
Cc `@rust-lang/miri` r? `@ghost`
2021-06-10 11:02:16 +09:00
Yuki Okushi
f7aea23bd2
Rollup merge of #86113 - the8472:doctest-lld, r=Mark-Simulacrum
build doctests with lld if use-lld = true

results when running `./x.py test library/core --doc --stage 0`:

```
# OLD
test result: FAILED. 2844 passed; 6 failed; 28 ignored; 0 measured; 0 filtered out; finished in 21.13s

# NEW
test result: FAILED. 2844 passed; 6 failed; 28 ignored; 0 measured; 0 filtered out; finished in 11.92s
```
2021-06-10 11:02:15 +09:00
Yuki Okushi
6a292ebdcf
Rollup merge of #86111 - spookyvision:master, r=JohnTitor
fix off by one in `std::iter::Iterator` documentation

the range `(0..10)` is documented as "The even numbers from zero to ten." - should be ".. to nine".
2021-06-10 11:02:14 +09:00
Yuki Okushi
ceed619194
Rollup merge of #86051 - erer1243:update_move_keyword_docs, r=Mark-Simulacrum
Updated code examples and wording in move keyword documentation

Had a conversation with someone on the Rust Discord who was confused by the move keyword documentation. Some of the wording is odd sounding ("owned by value" - what else can something be owned by?). Also, some of the examples used Copy types when demonstrating move, leading to variables still being accessible in the outer scope after the move, contradicting the examples' comments.

I changed the move keyword documentation a bit, removing that odd wording and changing all the examples to use non-Copy types
2021-06-10 11:02:13 +09:00
Yuki Okushi
232e7a5e7a
Rollup merge of #85997 - jyn514:rustdoc-diff, r=Mark-Simulacrum
rustdoc: Print a warning if the diff when comparing to old nightlies is empty

This avoids confusing situations where it's unclear whether there's a
bug in the diff tool or not:

```
26: `@has` check failed
        `XPATH PATTERN` did not match
        // `@has` - '//code/a[`@href="{{channel}}/std/primitive.i32.html"]'` 'i32'

Encountered 6 errors

------------------------------------------

info: generating a diff against nightly rustdoc

failures:
    [rustdoc] rustdoc/primitive-reexport.rs
```
2021-06-10 11:02:12 +09:00
Yuki Okushi
578eb6d65f
Rollup merge of #84687 - a1phyr:improve_rwlock, r=m-ou-se
Multiple improvements to RwLocks

This PR replicates #77147, #77380 and #84650 on RWLocks :
- Split `sys_common::RWLock` in `StaticRWLock` and `MovableRWLock`
- Unbox rwlocks on some platforms (Windows, Wasm and unsupported)
- Simplify `RwLock::into_inner`

Notes to reviewers :
- For each target, I copied `MovableMutex` to guess if `MovableRWLock` should be boxed.
- ~A comment says that `StaticMutex` is not re-entrant, I don't understand why and I don't know whether it applies to `StaticRWLock`.~

r? `@m-ou-se`
2021-06-10 11:02:10 +09:00
Yuki Okushi
27e84b89da
Rollup merge of #82037 - calavera:strip_debuginfo_osx, r=petrochenkov
Make symbols stripping work on MacOS X

As reported in the [stabilization issue](https://github.com/rust-lang/rust/issues/72110), MacOS' linker doesn't support the `-s` and `-S` flags to strip symbols anymore. However, the os ships a separated tool to perform these operations.

This change allows the compiler to use that tool after a target has been compiled to strip symbols.

For rationale, see: https://github.com/rust-lang/rust/issues/72110#issuecomment-641169818
For option selection, see: https://www.unix.com/man-page/osx/1/strip/

Signed-off-by: David Calavera <david.calavera@gmail.com>
2021-06-10 11:02:01 +09:00
bors
1639a16ebf Auto merge of #85910 - cjgillot:no-meta-version, r=Aaron1011
Drop metadata_encoding_version.

Part of #85153

r? `@Aaron1011`
2021-06-10 00:39:25 +00:00
The8472
53d71c181e optimize Eq implementation for paths
Filesystems generally have a tree-ish structure which means
paths are more likely to share a prefix than a suffix. Absolute paths
are especially prone to share long prefixes.
2021-06-09 23:11:07 +02:00
Rémy Rakic
d44990367d detect incorrect vtable alignment during const eval instead of ICE-ing
also add tests for these 2 kinds of errors for size and alignment,
as the existing size check wasn't apparently tested
2021-06-09 23:04:52 +02:00
Ralf Jung
b757a5e828 update Miri 2021-06-09 21:06:09 +02:00
Ellen
c318364d48 Add more tests + visit_ty in some places 2021-06-09 19:28:41 +01:00
Camille GILLOT
f387cffadb Access stable_crate_id directly. 2021-06-09 20:25:39 +02:00
Camille GILLOT
a246751ca1 Do not store crate in latest_foreign_def_path_hashes. 2021-06-09 20:23:46 +02:00
Camille GILLOT
5be514992f Encode CrateNum using the StableCrateId for incr. comp. 2021-06-09 20:20:49 +02:00
bors
eab201df70 Auto merge of #86003 - pnkfelix:issue-84297-revert-81238, r=Mark-Simulacrum
Make copy/copy_nonoverlapping fn's again

Make copy/copy_nonoverlapping fn's again, rather than intrinsics.

This a short-term change to address issue #84297.

It effectively reverts PRs #81167 #81238 (and part of #82967), #83091, and parts of #79684.
2021-06-09 16:47:05 +00:00
David Calavera
df0fc6daee Make symbols stripping work on MacOS X
As reported in the stabilization issue, MacOS' linker doesn't support the `-s` and `-S` flags to strip symbols anymore. However, the os ships a separated tool to perform these operations.

This change allows the compiler to use that tool after a target has been compiled to strip symbols.

For rationale, see: https://github.com/rust-lang/rust/issues/72110#issuecomment-641169818
For option selection, see: https://www.unix.com/man-page/osx/1/strip/

Signed-off-by: David Calavera <david.calavera@gmail.com>
2021-06-09 09:27:11 -07:00
Iago-lito
d442c104ea Fix diverging doc regarding signedness. 2021-06-09 17:28:34 +02:00
Iago-lito
3c168b0dc6 Explicit what check means on concerned method. 2021-06-09 17:28:34 +02:00
Iago-lito
b8056d8e29 NonZero saturating_pow. 2021-06-09 17:28:34 +02:00
Iago-lito
7b37800b45 NonZero checked_pow. 2021-06-09 17:28:34 +02:00
Iago-lito
6979bb40f8 NonZero unchecked_mul. 2021-06-09 17:28:33 +02:00
Iago-lito
7e0b9a8bd0 NonZero saturating_mul. 2021-06-09 17:28:33 +02:00
Iago-lito
ac3eb90d59 NonZero checked_mul. 2021-06-09 17:28:33 +02:00
Iago-lito
7e7b316163 NonZero unsigned_abs. 2021-06-09 17:28:33 +02:00
Iago-lito
b6589bbfa9 NonZero wrapping_abs. 2021-06-09 17:28:32 +02:00
Iago-lito
65e7321457 NonZero saturating_abs. 2021-06-09 17:28:32 +02:00
Iago-lito
6083b0ad2a NonZero overflowing_abs. 2021-06-09 17:28:32 +02:00
Iago-lito
62f97d950f NonZero checked_abs. 2021-06-09 17:28:31 +02:00
Iago-lito
a433b06347 NonZero abs. 2021-06-09 17:28:31 +02:00
Iago-lito
f7a1a9d075 NonZero checked_next_power_of_two. 2021-06-09 17:28:31 +02:00
Iago-lito
a3e1c358b6 NonZero unchecked_add. 2021-06-09 17:28:31 +02:00
Iago-lito
a67d605496 NonZero saturating_add. 2021-06-09 17:28:30 +02:00
Iago-lito
832c7f5061 NonZero checked_add. 2021-06-09 17:28:30 +02:00
Fabian Wolff
7dccce0706 Handle C-variadic arguments properly when reporting region errors 2021-06-09 17:02:39 +02:00
bors
47d38752c6 Auto merge of #86150 - cjgillot:notable, r=michaelwoerister
Do not require the DefPathTable to construct the on-disk cache.

r? `@michaelwoerister`
2021-06-09 14:06:10 +00:00
bjorn3
2754d4e514 Add safety comments 2021-06-09 14:51:42 +02:00
bjorn3
e1aa45b64d Use explicit drop impl 2021-06-09 14:47:01 +02:00
bors
38bc9b9933 Auto merge of #85975 - the8472:revert-take-tra, r=scottmcm
Revert "implement TrustedRandomAccess for Take iterator adapter"

This reverts commit 37a5b515e9 (#83990).

The original change unintentionally caused side-effects from certain iterator chains combining `take`, `zip` and `next_back()` to be omitted which is observable by user code and thus likely a breaking change

Technically one could declare it not a breaking change since `Zip`'s API contract is silent about about its backwards iteration behavior but on the other hand there is nothing in the stable Iterator API that could justify the currently observable behavior. And either way, this impact wasn't noticed or discussed in the original PR.

Fixes #85969
2021-06-09 11:24:54 +00:00
bors
c4b5406981 Auto merge of #86118 - spastorino:tait-soundness-bug, r=nikomatsakis
Create different inference variables for different defining uses of TAITs

Fixes #73481

r? `@nikomatsakis`
cc `@oli-obk`
2021-06-09 09:00:16 +00:00
Christiaan Dirkx
ed0557ec2c Remove is_unicast_site_local 2021-06-09 09:41:29 +02:00
bors
d45d205d59 Auto merge of #86107 - Smittyvb:peephole-optim-eq-bool, r=wesleywiser
Peephole optimize `x == false` and `x != true`

This adds peephole optimizations to make `x == false`, `false == x`, `x != true`, and `true != x` get optimized to `!x` in the `instcombine` MIR pass. That pass currently handles `x == true` -> `x` already.
2021-06-09 06:06:06 +00:00
bors
c8381389ee Auto merge of #86160 - JohnTitor:rollup-8ark9x7, r=JohnTitor
Rollup of 11 pull requests

Successful merges:

 - #85676 (Fix documentation style inconsistencies for IP addresses)
 - #85715 (Document `From` impls in string.rs)
 - #85791 (Add `Ipv6Addr::is_unicast`)
 - #85957 (Display defaults on const params- rustdoc )
 - #85982 (Enable rustdoc to document safe wasm intrinsics)
 - #86121 (Forwarding implementation for Seek trait's stream_position method)
 - #86124 (Include macro name in 'local ambiguity' error)
 - #86128 (Refactor: Extract render_summary from render_impl.)
 - #86142 (Simplify proc_macro code using Bound::cloned().)
 - #86158 (Update books)
 - #86159 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-06-09 03:15:34 +00:00
Yuki Okushi
d8376f4865
Rollup merge of #86159 - ehuss:update-cargo, r=ehuss
Update cargo

11 commits in 0cecbd67323ca14a7eb6505900d0d7307b00355b..aa8b09297bb3156b849e73db48af4cd050492fe6
2021-06-01 20:09:13 +0000 to 2021-06-09 00:28:53 +0000
- Add `--prune` option for cargo-tree (rust-lang/cargo#9520)
- Fix typo in gitignore docs. (rust-lang/cargo#9556)
- Fix typos in command_prelude.rs (rust-lang/cargo#9552)
- Make clippy happy (rust-lang/cargo#9551)
- Remove some dead code. (rust-lang/cargo#9546)
- Add additional test for CJK progress width (rust-lang/cargo#9515)
- Pull in semver 1.0.3 'x' fix (rust-lang/cargo#9544)
- Add some tracking issues to unstable docs. (rust-lang/cargo#9540)
- Update documentation for include/exclude. (rust-lang/cargo#9538)
- Bump mdbook version for contrib guide. (rust-lang/cargo#9534)
- Replace deprecated `[replace]` references with `[patch]` (rust-lang/cargo#9533)
2021-06-09 12:04:10 +09:00
Yuki Okushi
e8c1cc855c
Rollup merge of #86158 - ehuss:update-books, r=ehuss
Update books

## reference

4 commits in 9c68af3ce6ccca2395e1868addef26a0542e9ddd..8f598e2af6c25b4a7ee88ef6a8196d9b8ea50ca8
2021-05-24 09:53:32 -0700 to 2021-06-01 19:00:46 +0100
- Add crate and module to glossary. (rust-lang-nursery/reference#1016)
- Fix type_length_limit example. (rust-lang-nursery/reference#1026)
- Rearrange HRTB grammar. (rust-lang-nursery/reference#1011)
- Revert "Temporarily remove pat_param." (rust-lang-nursery/reference#1010)

## rustc-dev-guide

6 commits in 50de7f0682adc5d95ce858fe6318d19b4b951553..c8da5bfd1c7c71d90ef1646f5e0a9f6609d5c78a
2021-05-20 15:02:20 +0200 to 2021-06-04 09:08:56 +0200
- Fix some links (rust-lang/rustc-dev-guide#1137)
- explain Miri engine vs Miri-the-tool
- Add more information about no_hash query modifier. (rust-lang/rustc-dev-guide#1133)
- improve section introduction
- not all tools require waiting for a nightly release before they can be fixed
- Describe the difference of rustc_lint vs rustc_lint_defs.
2021-06-09 12:04:09 +09:00