]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agouse matches!() macro for simple if let conditions
Matthias Krüger [Fri, 18 Sep 2020 17:11:06 +0000 (19:11 +0200)]
use matches!() macro for simple if let conditions

3 years agoAuto merge of #76837 - wesleywiser:disable_consideredequal, r=oli-obk
bors [Fri, 18 Sep 2020 10:54:14 +0000 (10:54 +0000)]
Auto merge of #76837 - wesleywiser:disable_consideredequal, r=oli-obk

[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt

The logic is currently broken and we need to disable it to fix a beta
regression (see #76803)

r? `@oli-obk`

3 years agoAuto merge of #76854 - aDotInTheVoid:mir-opt-32-64-diff-name, r=oli-obk
bors [Fri, 18 Sep 2020 08:28:03 +0000 (08:28 +0000)]
Auto merge of #76854 - aDotInTheVoid:mir-opt-32-64-diff-name, r=oli-obk

Rename mir-opt diff tests with 32/64 bit

Now syntax highlighting should work.

I've tested that `--bless` works localy, but I'm not sure it's possible on CI

Fixes #75746

r? `@oli-obk`

3 years agoAuto merge of #76790 - ssomers:btree_slice_slasher_returns, r=Mark-Simulacrum
bors [Fri, 18 Sep 2020 05:47:00 +0000 (05:47 +0000)]
Auto merge of #76790 - ssomers:btree_slice_slasher_returns, r=Mark-Simulacrum

BTreeMap: avoid slices even more

Epilogue to #73971: it seems the compiler is unable to realize that creating a slice and `get_unchecked`-ing one element is a simple fetch. So try to spell it out for the only remaining but often invoked case.

Also, the previous code doesn't seem fair game to me, using `get_unchecked` to reach beyond the end of a slice. Although the local function `slice_insert` also does that.

r? `@Mark-Simulacrum`

3 years agoFix --bless for mir-opt 32/64 bit file
Nixon Enraght-Moony [Thu, 17 Sep 2020 21:25:33 +0000 (22:25 +0100)]
Fix --bless for mir-opt 32/64 bit file

3 years agoRename 32 bit mir files to be more tool friendly
Nixon Enraght-Moony [Thu, 17 Sep 2020 20:49:21 +0000 (21:49 +0100)]
Rename 32 bit mir files to be more tool friendly

See #75746

3 years agoRename 64 bit mir files to be more tool friendly
Nixon Enraght-Moony [Thu, 17 Sep 2020 20:35:21 +0000 (21:35 +0100)]
Rename 64 bit mir files to be more tool friendly

See #75746

3 years agoPut bit qualifier before mir/diff
Nixon Enraght-Moony [Thu, 17 Sep 2020 20:32:02 +0000 (21:32 +0100)]
Put bit qualifier before mir/diff

3 years agoAuto merge of #76645 - fusion-engineering-forks:windows-lock, r=kennytm
bors [Thu, 17 Sep 2020 19:23:58 +0000 (19:23 +0000)]
Auto merge of #76645 - fusion-engineering-forks:windows-lock, r=kennytm

 Small cleanups in Windows Mutex.

 - Move `held` into the boxed part, since the SRW lock implementation does not use this. This makes the Mutex 50% smaller.
 - Use `Cell` instead of `UnsafeCell` for `held`, such that `.replace()` can be used.
 - Add some comments.
 - Avoid creating multiple `&mut`s to the critical section object in `ReentrantMutex`.

3 years ago[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt
Wesley Wiser [Thu, 17 Sep 2020 13:29:39 +0000 (09:29 -0400)]
[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt

The logic is currently broken and we need to disable it to fix a beta
regression (see #76803)

3 years agoAuto merge of #76634 - RalfJung:miri-guaranteed-eq-ne, r=oli-obk
bors [Thu, 17 Sep 2020 12:15:57 +0000 (12:15 +0000)]
Auto merge of #76634 - RalfJung:miri-guaranteed-eq-ne, r=oli-obk

move guaranteed{ne,eq} implementation to compile-time machine

Currently, Miri needs a special hack to avoid using the core engine implementation of these intrinsics. That seems silly, so let's move them to the CTFE machine, which is the only machine that wants to use them.

I also added a reference to https://github.com/rust-lang/rust/issues/73722 as a warning to anyone who wants to adjust `guaranteed_eq`.

3 years agoAuto merge of #76028 - aticu:improve_e0118, r=estebank,jyn514,GuillaumeGomez
bors [Thu, 17 Sep 2020 03:56:38 +0000 (03:56 +0000)]
Auto merge of #76028 - aticu:improve_e0118, r=estebank,jyn514,GuillaumeGomez

Improve E0118

- Changes the "base type" terminology to "nominal type" (according to the [reference](https://doc.rust-lang.org/stable/reference/items/implementations.html#inherent-implementations)).
- Suggests removing a reference, if one is present on the type.
- Clarify what is meant by a "nominal type".

closes #69392

This is my first not-entirely-trivial PR, so please let me know if I missed anything or if something could be improved. Though I probably won't be able to fix anything in the upcoming week.

3 years agoAuto merge of #76804 - tmandry:rollup-nwntt3q, r=tmandry
bors [Wed, 16 Sep 2020 20:18:19 +0000 (20:18 +0000)]
Auto merge of #76804 - tmandry:rollup-nwntt3q, r=tmandry

Rollup of 16 pull requests

Successful merges:

 - #75026 (Add array_windows fn)
 - #76642 (Do not lint ignored private doc tests)
 - #76719 (Change error message for ty param in const)
 - #76721 (Use intra-doc links in `core::mem`)
 - #76728 (Add a comment why `extern crate` is necessary for rustdoc)
 - #76735 (Remove unnecessary `clone()`s in bootstrap)
 - #76741 (Avoid printing dry run timings)
 - #76747 (Add missing code examples in libcore)
 - #76756 (fix a couple of stylistic clippy warnings)
 - #76758 ([fuchsia] Propagate the userspace UTC clock)
 - #76759 (Fix stabilization marker for future_readiness_fns)
 - #76760 (don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations))
 - #76764 (Update books)
 - #76775 (Strip a single leading tab when rendering dataflow diffs)
 - #76778 (Simplify iter fuse struct doc)
 - #76794 (Make graphviz font configurable)

Failed merges:

r? `@ghost`

3 years agoRollup merge of #76794 - richkadel:graphviz-font, r=ecstatic-morse
Tyler Mandry [Wed, 16 Sep 2020 19:24:30 +0000 (12:24 -0700)]
Rollup merge of #76794 - richkadel:graphviz-font, r=ecstatic-morse

Make graphviz font configurable

Alternative to PR #76776.

To change the graphviz output to use an alternative `fontname` value,
add a command line option like: `rustc --graphviz-font=monospace`.

r? @ecstatic-morse

3 years agoRollup merge of #76778 - pickfire:patch-7, r=jonas-schievink
Tyler Mandry [Wed, 16 Sep 2020 19:24:28 +0000 (12:24 -0700)]
Rollup merge of #76778 - pickfire:patch-7, r=jonas-schievink

Simplify iter fuse struct doc

3 years agoRollup merge of #76775 - ecstatic-morse:dataflow-extra-tab-diff, r=Mark-Simulacrum
Tyler Mandry [Wed, 16 Sep 2020 19:24:27 +0000 (12:24 -0700)]
Rollup merge of #76775 - ecstatic-morse:dataflow-extra-tab-diff, r=Mark-Simulacrum

Strip a single leading tab when rendering dataflow diffs

The `fmt_diff_with` formatter uses a tab to separate additions from subtractions. Strip it when rendering those diffs on separate lines.

r? @Mark-Simulacrum (since you're speedy)

3 years agoRollup merge of #76764 - ehuss:update-books, r=ehuss
Tyler Mandry [Wed, 16 Sep 2020 19:24:25 +0000 (12:24 -0700)]
Rollup merge of #76764 - ehuss:update-books, r=ehuss

Update books

## nomicon

1 commits in 25854752549d44d76fbd7650e17cb4f167a0b8fb..6e57e64501f61873ab80cb78a07180a22751a5d6
2020-08-19 16:41:48 -0400 to 2020-09-14 11:40:23 -0400
- Fix API change to alloc::Global::grow. (rust-lang-nursery/nomicon#236)

## reference

3 commits in 25391dba46262f882fa846beefaff54a966a8fa5..56a13c082ee90736c08d6abdcd90462517b703d3
2020-09-02 07:22:55 -0700 to 2020-09-14 23:20:16 -0700
- Update the description of staticlib (rust-lang-nursery/reference#884)
- Rust 1.46 now allows more features in const fn (rust-lang-nursery/reference#883)
- Document the enum changes in RFC 2195 (rust-lang-nursery/reference#879)

## book

1 commits in e5ed97128302d5fa45dbac0e64426bc7649a558c..cb28dee95e5e50b793e6ba9291c5d1568d3ad72e
2020-08-31 12:53:40 -0500 to 2020-09-09 10:06:00 -0500
- Fixed the error message of invalid array element access in ch03.2 (rust-lang/book#2446)

3 years agoRollup merge of #76760 - matthiaskrgr:clippy_lazy_eval, r=varkor
Tyler Mandry [Wed, 16 Sep 2020 19:24:23 +0000 (12:24 -0700)]
Rollup merge of #76760 - matthiaskrgr:clippy_lazy_eval, r=varkor

don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations)

3 years agoRollup merge of #76759 - yoshuawuyts:fix-future-pending-ready-stabilization-label...
Tyler Mandry [Wed, 16 Sep 2020 19:24:21 +0000 (12:24 -0700)]
Rollup merge of #76759 - yoshuawuyts:fix-future-pending-ready-stabilization-label, r=Dylan-DPC

Fix stabilization marker for future_readiness_fns

Updated the rustc version in which this will be stabilized from `1.47.0 -> 1.48.0`. Fixes https://github.com/rust-lang/rust/pull/74328#issuecomment-692133125. Ref #70921.

r? @Dylan-DPC

3 years agoRollup merge of #76758 - adamlesinski:clone_clock, r=tmandry
Tyler Mandry [Wed, 16 Sep 2020 19:24:19 +0000 (12:24 -0700)]
Rollup merge of #76758 - adamlesinski:clone_clock, r=tmandry

[fuchsia] Propagate the userspace UTC clock

On Fuchsia, spawning a subprocess does not automatically
clone all of the parent process' capabilities. UTC time on
Fuchsia is managed by a top-level userspace clock capability
that is cloned and passed to subprocesses.

This change ensures that any Rust subprocess gets access to the
UTC clock, if the parent had access to it. This is critical for
tests, which on Fuchsia, use panic=abort and spawn subprocesses
per test.

3 years agoRollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPC
Tyler Mandry [Wed, 16 Sep 2020 19:24:17 +0000 (12:24 -0700)]
Rollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPC

fix a couple of stylistic clippy warnings

namely:

clippy::redundant_pattern_matching
clippy::redundant_pattern
clippy::search_is_some
clippy::filter_next
clippy::into_iter_on_ref
clippy::clone_on_copy
clippy::needless_return

3 years agoRollup merge of #76747 - GuillaumeGomez:more-missing-libcore-code-examples, r=Mark...
Tyler Mandry [Wed, 16 Sep 2020 19:24:16 +0000 (12:24 -0700)]
Rollup merge of #76747 - GuillaumeGomez:more-missing-libcore-code-examples, r=Mark-Simulacrum

Add missing code examples in libcore

3 years agoRollup merge of #76741 - Mark-Simulacrum:no-dry-run-timing, r=alexcrichton
Tyler Mandry [Wed, 16 Sep 2020 19:24:14 +0000 (12:24 -0700)]
Rollup merge of #76741 - Mark-Simulacrum:no-dry-run-timing, r=alexcrichton

Avoid printing dry run timings

This avoids a wall of text on CI with 0.000 as the likely time.

r? @alexcrichton

3 years agoRollup merge of #76735 - jyn514:no-clone, r=Mark-Simulacrum
Tyler Mandry [Wed, 16 Sep 2020 19:24:12 +0000 (12:24 -0700)]
Rollup merge of #76735 - jyn514:no-clone, r=Mark-Simulacrum

Remove unnecessary `clone()`s in bootstrap

The performance difference is negligible, but it makes me feel better.

r? @Mark-Simulacrum

3 years agoRollup merge of #76728 - jyn514:rustdoc-extern-crate, r=ehuss
Tyler Mandry [Wed, 16 Sep 2020 19:24:10 +0000 (12:24 -0700)]
Rollup merge of #76728 - jyn514:rustdoc-extern-crate, r=ehuss

Add a comment why `extern crate` is necessary for rustdoc

r? @ehuss

From https://github.com/rust-lang/rust/pull/74293#discussion_r488335500.

3 years agoRollup merge of #76721 - camelid:intra-doc-links-for-core-mem, r=jyn514
Tyler Mandry [Wed, 16 Sep 2020 19:24:08 +0000 (12:24 -0700)]
Rollup merge of #76721 - camelid:intra-doc-links-for-core-mem, r=jyn514

Use intra-doc links in `core::mem`

Part of #75080.

Last one for now!

---

@rustbot modify labels: A-intra-doc-links T-doc

3 years agoRollup merge of #76719 - hameerabbasi:min-const-generics-ty, r=lcnr
Tyler Mandry [Wed, 16 Sep 2020 19:24:06 +0000 (12:24 -0700)]
Rollup merge of #76719 - hameerabbasi:min-const-generics-ty, r=lcnr

Change error message for ty param in const

This PR introduces the following changes:

* Change error message for type param in a const expression when using
`min_const_generics`
* Change `ParamInNonTrivialAnonConst` to contain an extra `bool` used for
distinguishing whether the passed-in symbol is a type or a value.

Fixes #76701

3 years agoRollup merge of #76642 - GuillaumeGomez:ignored-private-doc-test, r=jyn514
Tyler Mandry [Wed, 16 Sep 2020 19:24:05 +0000 (12:24 -0700)]
Rollup merge of #76642 - GuillaumeGomez:ignored-private-doc-test, r=jyn514

Do not lint ignored private doc tests

Fixes #76457.

r? @ehuss

3 years agoRollup merge of #75026 - JulianKnodt:array_windows, r=Amanieu
Tyler Mandry [Wed, 16 Sep 2020 19:24:03 +0000 (12:24 -0700)]
Rollup merge of #75026 - JulianKnodt:array_windows, r=Amanieu

Add array_windows fn

This mimicks the functionality added by array_chunks, and implements a const-generic form of
`windows`. It makes egregious use of `unsafe`, but by necessity because the array must be
re-interpreted as a slice of arrays, and unlike array_chunks this cannot be done by casting the
original array once, since each time the index is advanced it needs to move one element, not
`N`.

I'm planning on adding more tests, but this should be good enough as a premise for the functionality.
Notably: should there be more functions overwritten for the iterator implementation/in general?

~~I've marked the issue as #74985 as there is no corresponding exact issue for `array_windows`, but it's based of off `array_chunks`.~~

Edit: See Issue #75027 created by @lcnr for tracking issue

~~Do not merge until I add more tests, please.~~

r? @lcnr

3 years agoAvoid creating `&mut`s in Windows ReentrantMutex.
Mara Bos [Wed, 16 Sep 2020 19:16:32 +0000 (21:16 +0200)]
Avoid creating `&mut`s in Windows ReentrantMutex.

3 years agoDon't use `mut` in Windows Mutex.
Mara Bos [Wed, 16 Sep 2020 19:09:53 +0000 (21:09 +0200)]
Don't use `mut` in Windows Mutex.

3 years agoAdded RUSTC_GRAPHVIZ_FONT environment variable
Rich Kadel [Wed, 16 Sep 2020 17:47:56 +0000 (10:47 -0700)]
Added RUSTC_GRAPHVIZ_FONT environment variable

Overrides the debugging_opts.graphviz_font setting.

3 years agoAuto merge of #76420 - Gelbpunkt:aarch64-linux-musl, r=pietroalbini
bors [Wed, 16 Sep 2020 17:22:54 +0000 (17:22 +0000)]
Auto merge of #76420 - Gelbpunkt:aarch64-linux-musl, r=pietroalbini

Add aarch64-unknown-linux-musl host builds

This adds aarch64-unknown-linux-musl to the hosts list and adds the build to the dist-arm-linux builder as `@Mark-Simulacrum` suggested to me in Zulip. `@jyn514` requested to be mentioned :smile:

I had to update the config for crosstool-ng as it had a prompt about the glibc version.

I ran `src/ci/docker/run.sh dist-arm-linux` to test it.

```
Build completed successfully in 1:31:50
Compile requests              8180
Compile requests executed     8135
Cache hits                     287
Cache misses                  7848
Cache timeouts                   0
Cache read errors                0
Forced recaches                  0
Cache write errors               0
Compilation failures             0
Cache errors                     0
Non-cacheable compilations       0
Non-cacheable calls             36
Non-compilation calls            9
Unsupported compiler calls       0
Average cache write          0.000 s
Average cache read miss      6.389 s
Average cache read hit       0.000 s
Cache location             Local disk: "/sccache"
Cache size                     202 MiB
Max cache size                  10 GiB
== clock drift check ==
  local time: Sun Sep  6 19:30:17 UTC 2020
  network time: Sun, 06 Sep 2020 19:30:17 GMT
== end clock drift check ==
```

Only errors were in miri due to struct fields being private (already been reported [here](https://github.com/rust-lang/rust/issues/76337))

Edit: Maybe it is helpful if I add that it is a working compiler
```sh
/rust-nightly-aarch64-unknown-linux-musl # ash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'cargo'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'clippy-preview'
install: installing component 'rustfmt-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'rust-analysis-aarch64-unknown-linux-musl'
install: installing component 'rust-std-aarch64-unknown-linux-musl'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    Rust is ready to roll.

/ # cat test.rs
fn main() { println!("hello world"); }
/ # rustc test.rs
/ # ./test
hello world
 # file test
test: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
```

3 years agoMake graphviz font configurable
Rich Kadel [Wed, 16 Sep 2020 15:10:06 +0000 (08:10 -0700)]
Make graphviz font configurable

Alternative to PR ##76776.

To change the graphviz output to use an alternative `fontname` value,
add a command line option like: `rustc --graphviz-font=monospace`.

3 years agoAdd array window fn
kadmin [Thu, 13 Aug 2020 19:09:14 +0000 (19:09 +0000)]
Add array window fn

Updated issue to #75027

Update to rm oob access

And hopefully fix docs as well

Fixed naming conflict in test

Fix test which used 1-indexing

Nth starts from 0, woops

Fix a bunch of off by 1 errors

See https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=757b311987e3fae1ca47122969acda5a

Add even more off by 1 errors

And also write `next` and `next_back` in terms of `nth` and `nth_back`.

Run fmt

Fix forgetting to change fn name in test

add nth_back test & document unsafe

Remove as_ref().unwrap()
Documented occurrences of unsafe, noting what invariants are maintained

3 years agoAuto merge of #76786 - Dylan-DPC:rollup-x6p60m6, r=Dylan-DPC
bors [Wed, 16 Sep 2020 13:23:46 +0000 (13:23 +0000)]
Auto merge of #76786 - Dylan-DPC:rollup-x6p60m6, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #76669 (Prefer asm! over llvm_asm! in core)
 - #76675 (Small improvements to asm documentation)
 - #76681 (remove orphaned files)
 - #76694 (Introduce a PartitioningCx struct)
 - #76695 (fix syntax error in suggesting generic constraint in trait parameter)
 - #76699 (improve const infer error)
 - #76707 (Simplify iter flatten struct doc)
 - #76710 (:arrow_up: rust-analyzer)
 - #76714 (Small docs improvements)
 - #76717 (Fix generating rustc docs with non-default lib directory.)

Failed merges:

r? `@ghost`

3 years agoRemove unnecessary `clone()`s in bootstrap
Joshua Nelson [Tue, 15 Sep 2020 04:08:37 +0000 (00:08 -0400)]
Remove unnecessary `clone()`s in bootstrap

The performance difference is negligible, but it makes me feel better.

Note that this does not remove some clones in `config`, because it would
require changing the logic around (and performance doesn't matter
for bootstrap).

3 years agoRollup merge of #76717 - ehuss:fix-rustc-book-libdir, r=Mark-Simulacrum
Dylan DPC [Wed, 16 Sep 2020 10:34:29 +0000 (12:34 +0200)]
Rollup merge of #76717 - ehuss:fix-rustc-book-libdir, r=Mark-Simulacrum

Fix generating rustc docs with non-default lib directory.

If `libdir` is set in `config.toml`, then the tool to generate the rustc docs was unable to run `rustc` because it could not find the shared libraries. The solution is to set the dylib search path to include the libdir.

I changed the API of `add_rustc_lib_path` to take `Command` instead of `Cargo` to try to share the code in several places. This is how it worked before https://github.com/rust-lang/rust/pull/64316, and I think this still retains the spirit of that change.

Fixes #76702

3 years agoRollup merge of #76714 - camelid:patch-3, r=jonas-schievink
Dylan DPC [Wed, 16 Sep 2020 10:34:27 +0000 (12:34 +0200)]
Rollup merge of #76714 - camelid:patch-3, r=jonas-schievink

Small docs improvements

@rustbot modify labels: T-doc T-compiler

3 years agoRollup merge of #76710 - rust-lang:rust-analyzer-2020-09-14, r=jonas-schievink
Dylan DPC [Wed, 16 Sep 2020 10:34:25 +0000 (12:34 +0200)]
Rollup merge of #76710 - rust-lang:rust-analyzer-2020-09-14, r=jonas-schievink

:arrow_up: rust-analyzer

r? @ghost

3 years agoRollup merge of #76707 - pickfire:patch-4, r=jonas-schievink
Dylan DPC [Wed, 16 Sep 2020 10:34:23 +0000 (12:34 +0200)]
Rollup merge of #76707 - pickfire:patch-4, r=jonas-schievink

Simplify iter flatten struct doc

3 years agoRollup merge of #76699 - lcnr:const-infer-err, r=varkor
Dylan DPC [Wed, 16 Sep 2020 10:34:21 +0000 (12:34 +0200)]
Rollup merge of #76699 - lcnr:const-infer-err, r=varkor

improve const infer error

cc #72328

reduces it from
```
error[E0282]: type annotations needed
  --> src/main.rs:17:5
   |
17 |     Foo.bar().bar().bar().bar().baz();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: unable to infer the value of a const parameter
```
to
```
error[E0282]: type annotations needed
  --> $DIR/method-chain.rs:21:33
   |
LL |     Foo.bar().bar().bar().bar().baz();
   |                                 ^^^
   |
   = note: cannot infer the value of the const parameter `N`
```

r? @varkor

3 years agoRollup merge of #76695 - iximeow:trait-generic-bound-suggestion, r=estebank
Dylan DPC [Wed, 16 Sep 2020 10:34:20 +0000 (12:34 +0200)]
Rollup merge of #76695 - iximeow:trait-generic-bound-suggestion, r=estebank

fix syntax error in suggesting generic constraint in trait parameter

suggest `where T: Foo` for the first bound on a trait, then suggest
`, T: Foo` when the suggested bound would add to an existing set of
`where` clauses. `where T: Foo` may be the first bound if `T` has a
default, because we'd rather suggest
```
trait A<T=()> where T: Copy
```
than
```
trait A<T: Copy=()>
```
for legibility reasons.

the test case i added here is derived from [this reproduction](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=0bf3ace9f2a183d0bdbd748c6b8e3971):
```
struct B<T: Copy> {
    t: T
}

trait A<T = ()> {
    fn returns_constrained_type(&self, t: T) -> B<T> {
        B { t }
    }
}
```
where the suggested fix,
```
trait A<T = ()>, T: Copy { ... }
```
is in fact invalid syntax!

i also found an error in the existing suggestion for `trait Base<T = String>: Super<T>` where rustc would suggest `trait Base<T = String>: Super<T>, T: Copy`, but `T: Copy` is the first of the trait's `where` clauses and should be `where T: Copy` as well. the test for that suggestion expects invalid syntax, and has been revised to a compiler-pleasing `trait Base<T = String>: Super<T> where T: Copy`.

judging by https://github.com/rust-lang/rust/pull/70009 i'll.. cc @estebank ?

3 years agoRollup merge of #76694 - wesleywiser:partitioning_cx_trait, r=davidtwco
Dylan DPC [Wed, 16 Sep 2020 10:34:18 +0000 (12:34 +0200)]
Rollup merge of #76694 - wesleywiser:partitioning_cx_trait, r=davidtwco

Introduce a PartitioningCx struct

This contains all the data used by the partitioning algorithm and allows that data to be used at each stage of the partitioning. This is useful for other approaches to partitioning which may want different pieces of the data available at each step.

cc @rust-lang/wg-incr-comp

3 years agoRollup merge of #76681 - tshepang:unused, r=Mark-Simulacrum
Dylan DPC [Wed, 16 Sep 2020 10:34:15 +0000 (12:34 +0200)]
Rollup merge of #76681 - tshepang:unused, r=Mark-Simulacrum

remove orphaned files

Should been part of https://github.com/rust-lang/rust/pull/74163

3 years agoRollup merge of #76675 - lzutao:asm_doc, r=Amanieu
Dylan DPC [Wed, 16 Sep 2020 10:34:14 +0000 (12:34 +0200)]
Rollup merge of #76675 - lzutao:asm_doc, r=Amanieu

Small improvements to asm documentation

Save people from searching and reading tons of comments in tracking issues.

3 years agoRollup merge of #76669 - lzutao:core_asm, r=Amanieu
Dylan DPC [Wed, 16 Sep 2020 10:34:11 +0000 (12:34 +0200)]
Rollup merge of #76669 - lzutao:core_asm, r=Amanieu

Prefer asm! over llvm_asm! in core

Replace llvm_asm! with asm! in core.

x86 asm compare (in somecases I replaced generic type with String).
* https://rust.godbolt.org/z/59eEMv
* https://rust.godbolt.org/z/v78s6q
* https://rust.godbolt.org/z/7qYY41

3 years agoFix black_box bug detected by Amanieu
Lzu Tao [Wed, 16 Sep 2020 09:25:54 +0000 (09:25 +0000)]
Fix black_box bug detected by Amanieu

Co-authored-by: Amanieu <amanieu@gmail.com>
3 years agoAuto merge of #76781 - RalfJung:rollup-ve66o2j, r=RalfJung
bors [Wed, 16 Sep 2020 06:46:24 +0000 (06:46 +0000)]
Auto merge of #76781 - RalfJung:rollup-ve66o2j, r=RalfJung

Rollup of 10 pull requests

Successful merges:

 - #76056 (Add more info for Vec Drain doc)
 - #76062 (Vec slice example fix style and show type elision)
 - #76262 (Use inline(never) instead of cold)
 - #76335 (Make all methods of `Duration` unstably const)
 - #76366 (Add Arith Tests in Library)
 - #76369 (Move Various str tests in library)
 - #76534 (Add doc comments for From impls)
 - #76622 (Update bootstrap readme)
 - #76641 (Some cleanup changes and commenting)
 - #76662 (Fix liballoc test suite for Miri)

Failed merges:

r? `@ghost`

3 years agoRollup merge of #76662 - RalfJung:lib-test-miri, r=Mark-Simulacrum
Ralf Jung [Wed, 16 Sep 2020 06:25:02 +0000 (08:25 +0200)]
Rollup merge of #76662 - RalfJung:lib-test-miri, r=Mark-Simulacrum

Fix liballoc test suite for Miri

Mostly, fix the regression introduced by https://github.com/rust-lang/rust/pull/75207 that caused slices (i.e., references) to be created to invalid memory or memory that has aliasing pointers that we want to keep valid. @dylni  this changes the type of `check_range` to only require the length, not the full reference to the slice, which indeed is all the information this function requires.

Also reduce the size of a test introduced in https://github.com/rust-lang/rust/pull/70793 to make it not take 3 minutes in Miri.

This makes https://github.com/RalfJung/miri-test-libstd work again.

3 years agoRollup merge of #76641 - nox:pointee-random-stuff, r=eddyb
Ralf Jung [Wed, 16 Sep 2020 06:25:00 +0000 (08:25 +0200)]
Rollup merge of #76641 - nox:pointee-random-stuff, r=eddyb

Some cleanup changes and commenting

r? @nikomatsakis
Cc @eddyb

3 years agoRollup merge of #76622 - jyn514:bootstrap-readme, r=Mark-Simulacrum
Ralf Jung [Wed, 16 Sep 2020 06:24:58 +0000 (08:24 +0200)]
Rollup merge of #76622 - jyn514:bootstrap-readme, r=Mark-Simulacrum

Update bootstrap readme

- Reflect changes in x.py defaults
- Remove recommendation to use nightly for incremental; it works fine on
beta
- Remove note that incremental chooses stage 1 by default; stage 1 is
already the default
- Update Discord -> Zulip

r? @Mark-Simulacrum

3 years agoRollup merge of #76534 - notriddle:doc-comments, r=jyn514
Ralf Jung [Wed, 16 Sep 2020 06:24:56 +0000 (08:24 +0200)]
Rollup merge of #76534 - notriddle:doc-comments, r=jyn514

Add doc comments for From impls

https://github.com/rust-lang/rust/issues/51430

3 years agoRollup merge of #76369 - ayushmishra2005:move_various_str_tests_library, r=jyn514
Ralf Jung [Wed, 16 Sep 2020 06:24:54 +0000 (08:24 +0200)]
Rollup merge of #76369 - ayushmishra2005:move_various_str_tests_library, r=jyn514

Move Various str tests in library

Moved various string ui  tests in library  as a part of #76268

r? @matklad

3 years agoRollup merge of #76366 - ayushmishra2005:arith_tests_in_library, r=jyn514
Ralf Jung [Wed, 16 Sep 2020 06:24:52 +0000 (08:24 +0200)]
Rollup merge of #76366 - ayushmishra2005:arith_tests_in_library, r=jyn514

Add Arith Tests in Library

Added Arith Tests library as a part of #76268

r? @matklad

3 years agoRollup merge of #76335 - CDirkx:const-duration, r=ecstatic-morse
Ralf Jung [Wed, 16 Sep 2020 06:24:50 +0000 (08:24 +0200)]
Rollup merge of #76335 - CDirkx:const-duration, r=ecstatic-morse

Make all methods of `Duration` unstably const

Make the following methods of `Duration` unstable const under `duration_const_2`:
 - `from_secs_f64`
 - `from_secs_f32`
 - `mul_f64`
 - `mul_f32`
 - `div_f64`
 - `div_f32`

This results in all methods of `Duration` being (unstable) const.

Moved the tests to `library` as part of #76268.

Possible because of #72449, which made the relevant `f32` and `f64` methods const.

Tracking issue: #72440

r? @ecstatic-morse

3 years agoRollup merge of #76262 - howard0su:patch-1, r=cramertj
Ralf Jung [Wed, 16 Sep 2020 06:24:49 +0000 (08:24 +0200)]
Rollup merge of #76262 - howard0su:patch-1, r=cramertj

Use inline(never) instead of cold

inline(never) is better way to avoid optimizer to inline the function instead of cold.

3 years agoRollup merge of #76062 - pickfire:patch-13, r=jyn514
Ralf Jung [Wed, 16 Sep 2020 06:24:46 +0000 (08:24 +0200)]
Rollup merge of #76062 - pickfire:patch-13, r=jyn514

Vec slice example fix style and show type elision

3 years agoRollup merge of #76056 - pickfire:patch-10, r=jyn514
Ralf Jung [Wed, 16 Sep 2020 06:24:40 +0000 (08:24 +0200)]
Rollup merge of #76056 - pickfire:patch-10, r=jyn514

Add more info for Vec Drain doc

See its documentation for more

3 years agoPrefer asm! over llvm_asm! in core
Lzu Tao [Wed, 16 Sep 2020 04:46:23 +0000 (04:46 +0000)]
Prefer asm! over llvm_asm! in core

3 years agoAuto merge of #76625 - jyn514:default-stages, r=Mark-Simulacrum
bors [Wed, 16 Sep 2020 04:05:22 +0000 (04:05 +0000)]
Auto merge of #76625 - jyn514:default-stages, r=Mark-Simulacrum

Make the default stage for x.py configurable

This also allows configuring each sub-command individually.

Possibly #76617 should land before this? I don't feel strongly either way, I don't mind waiting.

Closes https://github.com/rust-lang/rust/issues/76165.
r? `@Mark-Simulacrum`

3 years agoSimplify iter fuse struct doc
Ivan Tham [Wed, 16 Sep 2020 03:45:15 +0000 (11:45 +0800)]
Simplify iter fuse struct doc

3 years agodocument how to use memory addresses as operands
Lzu Tao [Mon, 14 Sep 2020 04:59:55 +0000 (04:59 +0000)]
document how to use memory addresses as operands

Co-authored-by: Amanieu <amanieu@gmail.com>
3 years agoStrip a single leading tab when rendering dataflow diffs
Dylan MacKenzie [Wed, 16 Sep 2020 01:32:12 +0000 (18:32 -0700)]
Strip a single leading tab when rendering dataflow diffs

3 years agoAuto merge of #76771 - Dylan-DPC:rollup-qj4j3ma, r=Dylan-DPC
bors [Wed, 16 Sep 2020 00:56:12 +0000 (00:56 +0000)]
Auto merge of #76771 - Dylan-DPC:rollup-qj4j3ma, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #73955 (deny(unsafe_op_in_unsafe_fn) in libstd/process.rs)
 - #75146 (Detect overflow in proc_macro_server subspan)
 - #75304 (Note when a a move/borrow error is caused by a deref coercion)
 - #75749 (Consolidate some duplicate code in the sys modules.)
 - #75882 (Use translated variable for test string)
 - #75886 (Test that bounds checks are elided for [..index] after .position())
 - #76048 (Initial support for riscv32gc_unknown_linux_gnu)
 - #76198 (Make some Ordering methods const)
 - #76689 (Upgrade to pulldown-cmark 0.8.0)
 - #76763 (Update cargo)

Failed merges:

r? `@ghost`

3 years agoRollup merge of #76763 - ehuss:update-cargo, r=ehuss
Dylan DPC [Tue, 15 Sep 2020 23:30:45 +0000 (01:30 +0200)]
Rollup merge of #76763 - ehuss:update-cargo, r=ehuss

Update cargo

6 commits in 875e0123259b0b6299903fe4aea0a12ecde9324f..8777a6b1e8834899f51b7e09cc9b8d85b2417110
2020-09-08 20:17:21 +0000 to 2020-09-15 19:11:03 +0000
- updated yank error message (rust-lang/cargo#8697)
- Fix non-determinism with new feature resolver. (rust-lang/cargo#8701)
- Display formatted output for JSON diffing in tests. (rust-lang/cargo#8692)
- Add --name suggestion for cargo new (rust-lang/cargo#8675)
- Sweep unrelated message from unnecessary workspace infromation (rust-lang/cargo#8681)
- Docs: Make it more clear we have two types of workspaces (rust-lang/cargo#8666)

3 years agoRollup merge of #76689 - jyn514:update-pulldown, r=GuillaumeGomez
Dylan DPC [Tue, 15 Sep 2020 23:30:44 +0000 (01:30 +0200)]
Rollup merge of #76689 - jyn514:update-pulldown, r=GuillaumeGomez

Upgrade to pulldown-cmark 0.8.0

Thanks to marcusklaas' hard work in https://github.com/raphlinus/pulldown-cmark/pull/469, this fixes a lot of rustdoc bugs!

- Get rid of unnecessary `RefCell`
- Fix duplicate warnings for broken implicit reference link
- Remove unnecessary copy of links

Closes https://github.com/rust-lang/rust/issues/73264, closes https://github.com/rust-lang/rust/issues/76687.
r? @euclio

I'm not sure if the switch away from `locate` fixes any open bugs - euclio mentioned some in https://github.com/raphlinus/pulldown-cmark/issues/165, but I didn't see any related issues open for rustdoc. Let me know if I missed one.

3 years agoRollup merge of #76198 - CDirkx:const-ordering, r=dtolnay
Dylan DPC [Tue, 15 Sep 2020 23:30:42 +0000 (01:30 +0200)]
Rollup merge of #76198 - CDirkx:const-ordering, r=dtolnay

Make some Ordering methods const

Resubmission of [PR#75463](https://github.com/rust-lang/rust/pull/75463) as per [PR#76172](https://github.com/rust-lang/rust/pull/76172).

Constify the following methods of `core::cmp::Ordering`:
 - `reverse`
 - `then`

Insta-stabilizes these methods as const under the `const_ordering` feature, as their implementation is a trivial match and the recent stabilization of #49146 (Allow `if` and `match` in constants).
Note: the `const_ordering` feature has never actually been used as these methods have not been `#[rustc_const_unstable]`.

Tracking issue:  #76113

3 years agoRollup merge of #76048 - alistair23:alistair/rv32-linux, r=Amanieu
Dylan DPC [Tue, 15 Sep 2020 23:30:40 +0000 (01:30 +0200)]
Rollup merge of #76048 - alistair23:alistair/rv32-linux, r=Amanieu

Initial support for riscv32gc_unknown_linux_gnu

Now that RISC-V 32-bit (RV32) support is in upstream glibc let's add support for userspace Rust.

3 years agoRollup merge of #75886 - erikdesjardins:index, r=nikic
Dylan DPC [Tue, 15 Sep 2020 23:30:38 +0000 (01:30 +0200)]
Rollup merge of #75886 - erikdesjardins:index, r=nikic

Test that bounds checks are elided for [..index] after .position()

Closes #73396.

This was fixed by the LLVM 11 update in #73526.

3 years agoRollup merge of #75882 - pickfire:patch-6, r=jyn514
Dylan DPC [Tue, 15 Sep 2020 23:30:36 +0000 (01:30 +0200)]
Rollup merge of #75882 - pickfire:patch-6, r=jyn514

Use translated variable for test string

Test should be educative, added english translation and pronounciation.

3 years agoRollup merge of #75749 - ehuss:consolidate-sys, r=alexcrichton
Dylan DPC [Tue, 15 Sep 2020 23:30:34 +0000 (01:30 +0200)]
Rollup merge of #75749 - ehuss:consolidate-sys, r=alexcrichton

Consolidate some duplicate code in the sys modules.

This consolidates some modules which were duplicated throughout the sys module. The intent is to make it easier to update and maintain this code. This mainly affects the wasi, sgx, and "unsupported" targets.

I explicitly skipped hermit, cloudabi, and vxworks. These tier-3 targets have copied large sections of the sys tree. I don't think they should have, but I don't want to put effort into changing them. It also doesn't help that there aren't any scripts or instructions for building them.

There are still sections of duplicate code here and there, but this PR covers the easy parts where entire modules are the same.

3 years agoRollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebank
Dylan DPC [Tue, 15 Sep 2020 23:30:32 +0000 (01:30 +0200)]
Rollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebank

Note when a a move/borrow error is caused by a deref coercion

Fixes #73268

When a deref coercion occurs, we may end up with a move error if the
base value has been partially moved out of. However, we do not indicate
anywhere that a deref coercion is occuring, resulting in an error
message with a confusing span.

This PR adds an explicit note to move errors when a deref coercion is
involved. We mention the name of the type that the deref-coercion
resolved to, as well as the `Deref::Target` associated type being used.

3 years agoRollup merge of #75146 - tmiasko:range-overflow, r=Mark-Simulacrum
Dylan DPC [Tue, 15 Sep 2020 23:30:30 +0000 (01:30 +0200)]
Rollup merge of #75146 - tmiasko:range-overflow, r=Mark-Simulacrum

Detect overflow in proc_macro_server subspan

* Detect overflow in proc_macro_server subspan
* Add tests for overflow in Vec::drain
* Add tests for overflow in String / VecDeque operations using ranges

3 years agoRollup merge of #73955 - hellow554:unsafe_process, r=Mark-Simulacrum
Dylan DPC [Tue, 15 Sep 2020 23:30:28 +0000 (01:30 +0200)]
Rollup merge of #73955 - hellow554:unsafe_process, r=Mark-Simulacrum

deny(unsafe_op_in_unsafe_fn) in libstd/process.rs

The libstd/process.rs part of #73904 . Wraps the two calls to an unsafe fn Initializer::nop() in an unsafe block.

Will have to wait for #73909 to be merged, because of the feature in the libstd/lib.rs

3 years agoBTreeMap: avoid slices even more
Stein Somers [Tue, 15 Sep 2020 20:11:46 +0000 (22:11 +0200)]
BTreeMap: avoid slices even more

3 years agoAuto merge of #76755 - pietroalbini:gha-macos, r=Mark-Simulacrum
bors [Tue, 15 Sep 2020 22:51:44 +0000 (22:51 +0000)]
Auto merge of #76755 - pietroalbini:gha-macos, r=Mark-Simulacrum

Gate macOS on both Azure and GHA

As discussed in the previous infrastructure team meeting, this PR gates macOS builds on both GHA and Azure. Once this is merged we'll wait a week or two to see if there is a troublesome rate of spurious failures, and if not we'll remove the builds on the Azure side.

r? `@Mark-Simulacrum`
cc #71988

3 years agoUpdate books
Eric Huss [Tue, 15 Sep 2020 21:55:50 +0000 (14:55 -0700)]
Update books

3 years agoUpdate cargo
Eric Huss [Tue, 15 Sep 2020 21:52:18 +0000 (14:52 -0700)]
Update cargo

3 years agohopefully fix rustdoc links
Ralf Jung [Tue, 15 Sep 2020 21:46:26 +0000 (23:46 +0200)]
hopefully fix rustdoc links

3 years agodon't lazily evaulate some trivial values for Option::None replacements (clippy:...
Matthias Krüger [Tue, 15 Sep 2020 21:10:24 +0000 (23:10 +0200)]
don't lazily evaulate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations)

3 years agofix slice::check_range aliasing problems
Ralf Jung [Sun, 13 Sep 2020 10:14:59 +0000 (12:14 +0200)]
fix slice::check_range aliasing problems

3 years agoFix stabilization marker for future_readiness_fns
Yoshua Wuyts [Tue, 15 Sep 2020 21:12:08 +0000 (23:12 +0200)]
Fix stabilization marker for future_readiness_fns

Moved it from 1.47.0 -> 1.48.0, which is the correct release for this to stabilize in

3 years agoreduce size of test_from_iter_specialization_with_iterator_adapters test in Miri
Ralf Jung [Sun, 13 Sep 2020 09:27:21 +0000 (11:27 +0200)]
reduce size of test_from_iter_specialization_with_iterator_adapters test in Miri

3 years agoAuto merge of #73595 - SNCPlay42:lifetime-after-mut, r=Mark-Simulacrum
bors [Tue, 15 Sep 2020 21:01:30 +0000 (21:01 +0000)]
Auto merge of #73595 - SNCPlay42:lifetime-after-mut, r=Mark-Simulacrum

improve diagnostics for lifetime after `&mut`

If, when parsing a borrow pointee type, we see a lifetime after `mut`, suggest placing the lifetime before `mut` and eat the lifetime to avoid a large number of unhelpful diagnostics.

There are some subtleties to avoid false positives in cases like `&mut 'a + Trait`, where `&mut ('a + Trait)` is a better suggestion.

fixes #73568

3 years ago[fuchsia] Propagate the userspace UTC clock
Adam Lesinski [Tue, 15 Sep 2020 20:54:46 +0000 (13:54 -0700)]
[fuchsia] Propagate the userspace UTC clock

On Fuchsia, spawning a subprocess does not automatically
clone all of the parent process' capabilities. UTC time on
Fuchsia is managed by a top-level userspace clock capability
that is cloned and passed to subprocesses.

This change ensures that any Rust subprocess gets access to the
UTC clock, if the parent had access to it. This is critical for
tests, which on Fuchsia, use panic=abort and spawn subprocesses
per test.

3 years agofix a couple of stylistic clippy warnings
Matthias Krüger [Tue, 15 Sep 2020 20:36:43 +0000 (22:36 +0200)]
fix a couple of stylistic clippy warnings

namely:

clippy::redundant_pattern_matching
clippy::redundant_pattern
clippy::search_is_some
clippy::filter_next
clippy::into_iter_on_ref
clippy::clone_on_copy
clippy::needless_return

3 years agoci: gate macOS on GHA too
Pietro Albini [Tue, 15 Sep 2020 19:56:07 +0000 (21:56 +0200)]
ci: gate macOS on GHA too

3 years agoAuto merge of #73166 - jethrogb:stdarch, r=Amanieu
bors [Tue, 15 Sep 2020 19:04:40 +0000 (19:04 +0000)]
Auto merge of #73166 - jethrogb:stdarch, r=Amanieu

Update stdarch

This PR **changes the public signature** of the following functions in `core::arch::{x86, x86_64}`:
```patch
-pub unsafe fn _mm256_extract_epi8(a: __m256i, imm8: i32) -> i8
+pub unsafe fn _mm256_extract_epi8(a: __m256i, imm8: i32) -> i32
-pub unsafe fn _mm256_extract_epi16(a: __m256i, imm8: i32) -> i16
+pub unsafe fn _mm256_extract_epi16(a: __m256i, imm8: i32) -> i32
```

This change is desired so that these signatures
* are similar to those of the 128-bit versions `_mm_extract_epi8` and `_mm_extract_epi16`
* match the Intel definitions for the intrinsics
  * [RFC 2325](https://github.com/rust-lang/rfcs/blob/master/text/2325-stable-simd.md) specifies that the exact vendor function signatures should be used

A [crater run](https://github.com/rust-lang/rust/pull/73166#issuecomment-667230319) revealed only a single breakage. The [vektor crate](https://github.com/AdamNiederer/vektor/blob/master/src/x86/avx2.rs#L2436-L2472) copied the incorrect signatures in `core` exactly to their own crate. The functions don't seem to be used by anyone anywhere.

Actual breakage is not expected, since due to the nature of the functions, users would generally write `_mm256_extract_epi8(...) as u8` or `_mm256_extract_epi16(...) as u16`.

See https://github.com/rust-lang/stdarch/pull/868/. Note that the changes from that stdarch PR have already partially landed in core after https://github.com/rust-lang/stdarch/pull/878/. This PR is now only about the remaining changes.

3 years agoAuto merge of #75148 - joechrisellis:master, r=Amanieu
bors [Tue, 15 Sep 2020 17:05:57 +0000 (17:05 +0000)]
Auto merge of #75148 - joechrisellis:master, r=Amanieu

Implementation of peer credentials for Unix sockets

The code in `ucred.rs` is based on the work done in [PR 13](https://github.com/tokio-rs/tokio-uds/pull/13) in the tokio-uds repository on GitHub.

This commit is effectively a port to the stdlib, so credit to Martin Habovštiak (`@Kixunil)` and contributors for the meat of this work. 🥇

Happy to make changes as needed. 🙂

3 years agoAdd missing code examples in libcore
Guillaume Gomez [Tue, 15 Sep 2020 16:18:04 +0000 (18:18 +0200)]
Add missing code examples in libcore

3 years agoAdjust spelling
Niclas Schwarzlose [Tue, 15 Sep 2020 16:10:41 +0000 (18:10 +0200)]
Adjust spelling

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agoUpdate stdarch
Jethro Beekman [Tue, 8 Sep 2020 12:17:15 +0000 (14:17 +0200)]
Update stdarch

3 years agoMake the default stage for x.py configurable
Joshua Nelson [Sat, 12 Sep 2020 02:17:16 +0000 (22:17 -0400)]
Make the default stage for x.py configurable

This allows configuring the default stage for each sub-command individually.

- Normalize the stage as early as possible, so there's no confusion
  about which to use.
- Don't add an explicit `stage` option in config.toml

  This offers no more flexibility than `*_stage` and makes it confusing
  which takes precedence.

- Always give `--stage N` precedence over config.toml
- Fix bootstrap tests

  This changes the tests to go through `Config::parse` so that they test
  the actual defaults, not the dummy ones provided by `default_opts`.  To
  make this workable (and independent of the environment), it does not
  read `config.toml` for tests.

3 years agodoc: platform-support.md: Move to tier 3
Alistair Francis [Tue, 15 Sep 2020 15:13:01 +0000 (08:13 -0700)]
doc: platform-support.md: Move to tier 3

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 years agoAuto merge of #76708 - Mark-Simulacrum:lld-macos, r=alexcrichton
bors [Tue, 15 Sep 2020 15:06:59 +0000 (15:06 +0000)]
Auto merge of #76708 - Mark-Simulacrum:lld-macos, r=alexcrichton

Always try to promote shared LLVM to the sysroot

Even when LLVM is not generally participating in a shared link with rustc, we
will likely still link to the shared dylib from rust-lld, so we still need to
promote it.

This reverts part of #76349; my expectation that the link-shared rule was sufficient was likely wrong.

Hopefully fixes #76698.

r? `@alexcrichton`

3 years agodoc: platform-support.md: Document port
Alistair Francis [Tue, 15 Sep 2020 14:58:33 +0000 (07:58 -0700)]
doc: platform-support.md: Document port

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
3 years agoimprove diagnostics for lifetime after `&mut`
SNCPlay42 [Sun, 21 Jun 2020 20:37:17 +0000 (21:37 +0100)]
improve diagnostics for lifetime after `&mut`

3 years agoEnable shared linking to LLVM on non-Windows
Mark Rousskov [Mon, 14 Sep 2020 20:22:56 +0000 (16:22 -0400)]
Enable shared linking to LLVM on non-Windows

Windows doesn't quite support dynamic linking to LLVM yet, but on other
platforms we do. In #76708, it was discovered that we dynamically link to LLVM
from the LLVM tools (e.g., rust-lld), so we need the shared LLVM library to link
against. That means that if we do not have a shared link to LLVM, and want LLVM
tools to work, we'd be shipping two copies of LLVM on all of these platforms:
one in librustc_driver and one in libLLVM.

Also introduce an error into rustbuild if we do end up configured for shared
linking on Windows.

3 years agoConsolidate wasi::process and unsupported::process
Eric Huss [Thu, 20 Aug 2020 18:22:46 +0000 (11:22 -0700)]
Consolidate wasi::process and unsupported::process