]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry
bors [Wed, 3 Jun 2020 12:20:45 +0000 (12:20 +0000)]
Auto merge of #72746 - petrhosek:libunwind-hermetic, r=tmandry

Make libunwind build hermetic

We want to avoid exporting any symbols from Rust's version of libunwind,
and to do so we need to disable visibility annotations to make sure that
the -fvisibility=hidden has effect, and also hide global new/delete.

This matches the CMake build of libunwind.

4 years agoAuto merge of #70107 - lcnr:issue68977, r=eddyb
bors [Wed, 3 Jun 2020 08:43:11 +0000 (08:43 +0000)]
Auto merge of #70107 - lcnr:issue68977, r=eddyb

WF-check all ty::Const's, not just array lengths.

fixes #68977

This PR removes the special case for array length in `wf::compute` and
checks the well formedness of all consts.

Changes `PredicateKind::WellFormed` to take a `GenericArg` and updates `wf::obligations`.

4 years agoAuto merge of #72935 - Dylan-DPC:rollup-60g3ab6, r=Dylan-DPC
bors [Wed, 3 Jun 2020 01:00:39 +0000 (01:00 +0000)]
Auto merge of #72935 - Dylan-DPC:rollup-60g3ab6, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72704 (Remote testing fixes)
 - #72820 (InstCombine: Don't optimize `&mut *x` into `x`)
 - #72848 (Correct generic parameter ordering in error note for E0747)
 - #72902 (Add a test to ensure Fuse stays covariant)
 - #72921 (Add assert to Vec with_capacity docs)

Failed merges:

r? @ghost

4 years agoRollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum
Dylan DPC [Wed, 3 Jun 2020 00:39:09 +0000 (02:39 +0200)]
Rollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum

Add assert to Vec with_capacity docs

4 years agoRollup merge of #72902 - cuviper:fuse-covariant, r=nikomatsakis
Dylan DPC [Wed, 3 Jun 2020 00:39:07 +0000 (02:39 +0200)]
Rollup merge of #72902 - cuviper:fuse-covariant, r=nikomatsakis

Add a test to ensure Fuse stays covariant

When #70502 attempted to specialize the data types in `Fuse`, one of the problems we found was that it broke variance. This was also realized when `Fuse` was first added, https://github.com/rust-lang/rust/pull/35656#discussion-diff-74995079, but now this PR adds a test so we don't forget again.

4 years agoRollup merge of #72848 - camelid:fix-72815, r=varkor
Dylan DPC [Wed, 3 Jun 2020 00:39:05 +0000 (02:39 +0200)]
Rollup merge of #72848 - camelid:fix-72815, r=varkor

Correct generic parameter ordering in error note for E0747

Fixes #72815.

r? @varkor

4 years agoRollup merge of #72820 - jonas-schievink:instcombine-uninit, r=oli-obk
Dylan DPC [Wed, 3 Jun 2020 00:39:03 +0000 (02:39 +0200)]
Rollup merge of #72820 - jonas-schievink:instcombine-uninit, r=oli-obk

InstCombine: Don't optimize `&mut *x` into `x`

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

4 years agoRollup merge of #72704 - tblah:remote-testing-fixes, r=Mark-Simulacrum
Dylan DPC [Wed, 3 Jun 2020 00:38:59 +0000 (02:38 +0200)]
Rollup merge of #72704 - tblah:remote-testing-fixes, r=Mark-Simulacrum

Remote testing fixes

Improvements for remote testing

- Create a `RUST_TEST_TMPDIR` directory on the remote testing host
- Verbose mode for remote-test-server
- Skip tests which don't support remote testing using `// ignore-remote`

To test:
- Build `remote-test-server` for the target machine and copy it over
- On the target:
``` sh
remote-test-server remote
```
- On the build machine
``` sh
export TEST_DEVICE_ADDR="1.2.3.4:12345"
./x.py test
```

4 years agoAdd assert to Vec with_capacity docs
Ivan Tham [Tue, 2 Jun 2020 17:29:02 +0000 (01:29 +0800)]
Add assert to Vec with_capacity docs

4 years agoAuto merge of #72918 - Dylan-DPC:rollup-pnvj62b, r=Dylan-DPC
bors [Tue, 2 Jun 2020 16:30:44 +0000 (16:30 +0000)]
Auto merge of #72918 - Dylan-DPC:rollup-pnvj62b, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #72884 (RawString error reporting cleanup )
 - #72888 (Add a warning about infinite reading in read_(until|line))
 - #72914 (Minor: off-by-one error in RELEASES.md)
 - #72916 (Update README.md)

Failed merges:

r? @ghost

4 years agoRollup merge of #72916 - DutchGhost:patch-1, r=jonas-schievink
Dylan DPC [Tue, 2 Jun 2020 16:30:05 +0000 (18:30 +0200)]
Rollup merge of #72916 - DutchGhost:patch-1, r=jonas-schievink

Update README.md

https://github.com/rust-lang/rust/pull/72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`

4 years agoRollup merge of #72914 - petertodd:2020-minor-at-most-32, r=jonas-schievink
Dylan DPC [Tue, 2 Jun 2020 16:30:03 +0000 (18:30 +0200)]
Rollup merge of #72914 - petertodd:2020-minor-at-most-32, r=jonas-schievink

Minor: off-by-one error in RELEASES.md

4 years agoRollup merge of #72888 - poliorcetics:improve-read_line-read_until-doc, r=Dylan-DPC
Dylan DPC [Tue, 2 Jun 2020 16:29:59 +0000 (18:29 +0200)]
Rollup merge of #72888 - poliorcetics:improve-read_line-read_until-doc, r=Dylan-DPC

Add a warning about infinite reading in read_(until|line)

Fix for #48788.

This PR adds a warning to [`BufRead::read_line`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_line) and [`BufRead::read_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_until) about the possibility of an attack using the behaviour of these functions.

I did not mention a possible fix (using [`Read::take`](https://doc.rust-lang.org/stable/std/io/trait.Read.html#method.take), should I ?

4 years agoRollup merge of #72884 - Julian-Wollersberger:raw_str_error_cleanup, r=petrochenkov
Dylan DPC [Tue, 2 Jun 2020 16:29:57 +0000 (18:29 +0200)]
Rollup merge of #72884 - Julian-Wollersberger:raw_str_error_cleanup, r=petrochenkov

RawString error reporting cleanup

I simplified how errors with raw string are represented in the lexer and reportet in the parser, by using one enum instead of two structs with impls. This makes 70 code lines obsolete.

I also noticed some other things (2nd commit) and added a missing test for the `too many '#' symbols' error.

My original intent was to improve performance, but the only thing I found was to inline some functions in `cursor.rs`. It's effect is barely measurable, though.

There is one open question. Before, the compiler aborts when encountering the `too many '#' symbols` error. Now the lexer says in this case that there are 0 hashes, and then later the parser aborts on the error.
I'm worrying that the parser may be changed to recover and continue, and then later stages will see the wrong numer of hashes and act strange. (eg. the `format!` macro expansion).
Is that possibility important enough today to worry about it?

4 years agoUpdate README.md
DutchGhost [Tue, 2 Jun 2020 14:12:36 +0000 (16:12 +0200)]
Update README.md

https://github.com/rust-lang/rust/pull/72827 changed it from `*.nix` to `Unix-like system`, but actually it should be `a Unix-like system`

4 years agoMinor: off-by-one error in RELEASES.md
Peter Todd [Tue, 2 Jun 2020 13:47:33 +0000 (09:47 -0400)]
Minor: off-by-one error in RELEASES.md

4 years agoupdate tests
Bastian Kauschke [Tue, 26 May 2020 21:13:18 +0000 (23:13 +0200)]
update tests

4 years agochange WellFormed predicate to GenericArg
Bastian Kauschke [Tue, 26 May 2020 21:12:01 +0000 (23:12 +0200)]
change WellFormed predicate to GenericArg

4 years agoadd WellFormedConst predicate
Bastian Kauschke [Sat, 23 May 2020 16:28:50 +0000 (18:28 +0200)]
add WellFormedConst predicate

4 years agoimplement wf checking for constants
Bastian Kauschke [Sat, 23 May 2020 13:29:51 +0000 (15:29 +0200)]
implement wf checking for constants

4 years agocompiletest: Add name directive for remote runners
Tom Eccles [Thu, 28 May 2020 16:32:12 +0000 (17:32 +0100)]
compiletest: Add name directive for remote runners

Allow tests to use
// ignore-remote
to ignore the test when using remote-test-{client,server}. In most
situations this would be covered by
// ignore-cross-compile
but I see no reason that a non-cross compiled remote test runner
shouldn't work.

4 years agotools/remote-test-server: make use of verbose option
Tom Eccles [Thu, 28 May 2020 16:53:29 +0000 (17:53 +0100)]
tools/remote-test-server: make use of verbose option

There was an unused verbose command line argument. Add some prints if
verbose is set.

4 years agotools/remote-test-{server,client}: support RUST_TEST_TMPDIR
Tom Eccles [Thu, 28 May 2020 15:27:56 +0000 (16:27 +0100)]
tools/remote-test-{server,client}: support RUST_TEST_TMPDIR

Some tests (e.g. ui-fulldeps/create-dir-all-bare.rs) assume that
RUST_TEST_TMPDIR exists on the system running the test. Expand
remote-test-{server,client} such that a tmp directory is created on the
remote runner and this environment variable will point at it.

4 years agoAuto merge of #72672 - seritools:remote-test-windows, r=Mark-Simulacrum
bors [Tue, 2 Jun 2020 07:54:38 +0000 (07:54 +0000)]
Auto merge of #72672 - seritools:remote-test-windows, r=Mark-Simulacrum

Make remote-test-client and remote-test-server compatible with windows

`compiletest` and `remote-test-client`:

The command line for `remote-test-client` was changed slightly to allow cross-platform compatible paths. The old way of supplying the support libs was by joining their paths with the executable path
with `:`. This caused Windows-style paths to be split after the directory letter. Now, the number of support libs is provided as a parameter as well, and the support lib paths are split off from the regular args in the client.

`remote-test-server`:

- Marked Unix-only parts as such and implemented Windows alternatives
- On Windows `LD_LIBRARY_PATH` doesn't exist. Libraries are loaded from `PATH` though, so that's the way around it.
- Tiny cleanup: `Command::args`/`envs` instead of manually looping over them
- The temp path for Windows has to be set via environment variable, since there isn't a global temp directory that would work on every machine (as a static string)

4 years agoAuto merge of #72905 - JohnTitor:rollup-phtyo5i, r=JohnTitor
bors [Tue, 2 Jun 2020 04:10:49 +0000 (04:10 +0000)]
Auto merge of #72905 - JohnTitor:rollup-phtyo5i, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #72775 (Return early to avoid ICE)
 - #72795 (Add a test for `$:ident` in proc macro input)
 - #72822 (remove trivial calls to mk_const)
 - #72825 (Clarify errors and warnings about the transition to the new asm!)
 - #72827 (changed *nix to Unix-like)
 - #72880 (Clean up E0637 explanation)
 - #72886 (Remove allow missing_debug_implementations for MaybeUninit)
 - #72889 (rustc: Remove the `--passive-segments` LLD flag on wasm)
 - #72891 (Add associated consts MIN/MAX for Wrapping<Int>)
 - #72893 (test miri-unleash TLS accesses)

Failed merges:

r? @ghost

4 years agoRollup merge of #72893 - RalfJung:unleash-tls, r=ecstatic-morse
Yuki Okushi [Tue, 2 Jun 2020 04:07:27 +0000 (13:07 +0900)]
Rollup merge of #72893 - RalfJung:unleash-tls, r=ecstatic-morse

test miri-unleash TLS accesses

Finally gets rid of `IS_SUPPORTED_IN_MIRI`. :-)

I also added a test for the new `asm!` while I am at it.

r? @ecstatic-morse Cc @rust-lang/wg-const-eval

4 years agoRollup merge of #72891 - lzutao:wrapping_int-max, r=sfackler
Yuki Okushi [Tue, 2 Jun 2020 04:07:25 +0000 (13:07 +0900)]
Rollup merge of #72891 - lzutao:wrapping_int-max, r=sfackler

Add associated consts MIN/MAX for Wrapping<Int>

4 years agoRollup merge of #72889 - alexcrichton:update-wasm-threads, r=nikomatsakis
Yuki Okushi [Tue, 2 Jun 2020 04:07:24 +0000 (13:07 +0900)]
Rollup merge of #72889 - alexcrichton:update-wasm-threads, r=nikomatsakis

rustc: Remove the `--passive-segments` LLD flag on wasm

This flag looks like it's been removed in LLVM 10, so this removes rustc
unconditionally passing the flag.

4 years agoRollup merge of #72886 - xfix:patch-21, r=jonas-schievink
Yuki Okushi [Tue, 2 Jun 2020 04:07:22 +0000 (13:07 +0900)]
Rollup merge of #72886 - xfix:patch-21, r=jonas-schievink

Remove allow missing_debug_implementations for MaybeUninit

It already has a Debug implementation.

4 years agoRollup merge of #72880 - GuillaumeGomez:cleanup-e0637, r=Dylan-DPC
Yuki Okushi [Tue, 2 Jun 2020 04:07:20 +0000 (13:07 +0900)]
Rollup merge of #72880 - GuillaumeGomez:cleanup-e0637, r=Dylan-DPC

Clean up E0637 explanation

r? @Dylan-DPC

4 years agoRollup merge of #72827 - milrope:patch-1, r=nikomatsakis
Yuki Okushi [Tue, 2 Jun 2020 04:07:18 +0000 (13:07 +0900)]
Rollup merge of #72827 - milrope:patch-1, r=nikomatsakis

changed *nix to Unix-like

4 years agoRollup merge of #72825 - Amanieu:asm-warning, r=davidtwco
Yuki Okushi [Tue, 2 Jun 2020 04:07:17 +0000 (13:07 +0900)]
Rollup merge of #72825 - Amanieu:asm-warning, r=davidtwco

Clarify errors and warnings about the transition to the new asm!

Hopefully addresses the concerns from https://github.com/rust-lang/rust/pull/71007#issuecomment-636412905.

4 years agoRollup merge of #72822 - lcnr:intern-me, r=estebank
Yuki Okushi [Tue, 2 Jun 2020 04:07:15 +0000 (13:07 +0900)]
Rollup merge of #72822 - lcnr:intern-me, r=estebank

remove trivial calls to mk_const

similar to #72754

4 years agoRollup merge of #72795 - petrochenkov:identgroup, r=nikomatsakis
Yuki Okushi [Tue, 2 Jun 2020 04:07:13 +0000 (13:07 +0900)]
Rollup merge of #72795 - petrochenkov:identgroup, r=nikomatsakis

Add a test for `$:ident` in proc macro input

cc https://github.com/rust-lang/rust/issues/72545#issuecomment-636388019

4 years agoRollup merge of #72775 - JohnTitor:await-sugg, r=estebank
Yuki Okushi [Tue, 2 Jun 2020 04:07:12 +0000 (13:07 +0900)]
Rollup merge of #72775 - JohnTitor:await-sugg, r=estebank

Return early to avoid ICE

Fixes #72766

4 years agoAdd a test to ensure Fuse stays covariant
Josh Stone [Tue, 2 Jun 2020 00:47:26 +0000 (17:47 -0700)]
Add a test to ensure Fuse stays covariant

4 years agoFix comment
Ralf Jung [Mon, 1 Jun 2020 22:55:11 +0000 (00:55 +0200)]
Fix comment

Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
4 years agoCleanup: Inline `struct_span_fatal()`, which is only called once, and remove an outda...
Julian Wollersberger [Mon, 1 Jun 2020 11:25:41 +0000 (13:25 +0200)]
Cleanup: Inline `struct_span_fatal()`, which is only called once, and remove an outdated FIXME.

4 years agoSimplify raw string error reporting.
Julian Wollersberger [Fri, 29 May 2020 15:37:16 +0000 (17:37 +0200)]
Simplify raw string error reporting.
This makes `UnvalidatedRawStr` and `ValidatedRawStr` unnecessary and removes 70 lines.

4 years agoInclude kind in `bug!`
Camelid [Mon, 1 Jun 2020 20:01:01 +0000 (13:01 -0700)]
Include kind in `bug!`

Co-authored-by: hafiz <20735482+ayazhafiz@users.noreply.github.com>
4 years agoAuto merge of #72779 - RalfJung:miri, r=oli-obk
bors [Mon, 1 Jun 2020 19:03:23 +0000 (19:03 +0000)]
Auto merge of #72779 - RalfJung:miri, r=oli-obk

bump Miri, update for cargo-miri being a separate project

r? @oli-obk

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

4 years agotest miri-unleash TLS accesses
Ralf Jung [Mon, 1 Jun 2020 18:53:45 +0000 (20:53 +0200)]
test miri-unleash TLS accesses

4 years agobump Miri, update for cargo-miri being a separate project
Ralf Jung [Mon, 1 Jun 2020 18:17:20 +0000 (20:17 +0200)]
bump Miri, update for cargo-miri being a separate project

4 years agoUse `bug!` instead of `panic!`
Camelid [Mon, 1 Jun 2020 17:52:07 +0000 (10:52 -0700)]
Use `bug!` instead of `panic!`

Co-authored-by: varkor <github@varkor.com>
4 years agoAdd associated consts MIN/MAX for Wrapping<Int>
Lzu Tao [Mon, 1 Jun 2020 17:03:47 +0000 (17:03 +0000)]
Add associated consts MIN/MAX for Wrapping<Int>

4 years agorustc: Remove the `--passive-segments` LLD flag on wasm
Alex Crichton [Mon, 1 Jun 2020 15:33:07 +0000 (08:33 -0700)]
rustc: Remove the `--passive-segments` LLD flag on wasm

This flag looks like it's been removed in LLVM 10, so this removes rustc
unconditionally passing the flag.

4 years agoAdd a warning about infinite reading in read_(until|line)
Alexis Bourget [Mon, 1 Jun 2020 14:19:10 +0000 (16:19 +0200)]
Add a warning about infinite reading in read_(until|line)

4 years agoRemove allow missing_debug_implementations for MaybeUninit
Konrad Borowski [Mon, 1 Jun 2020 13:36:45 +0000 (15:36 +0200)]
Remove allow missing_debug_implementations for MaybeUninit

It already has a Debug implementation.

4 years agoAuto merge of #71192 - oli-obk:eager_alloc_id_canonicalization, r=wesleywiser
bors [Mon, 1 Jun 2020 11:44:51 +0000 (11:44 +0000)]
Auto merge of #71192 - oli-obk:eager_alloc_id_canonicalization, r=wesleywiser

Make TLS accesses explicit in MIR

r? @rust-lang/wg-mir-opt

cc @RalfJung @vakaras for miri thread locals

cc @bjorn3 for cranelift

fixes #70685

4 years agoClean up E0637 explanation
Guillaume Gomez [Mon, 1 Jun 2020 11:07:29 +0000 (13:07 +0200)]
Clean up E0637 explanation

4 years agoAuto merge of #72844 - Dylan-DPC:rollup-i51qv5z, r=Dylan-DPC
bors [Mon, 1 Jun 2020 05:21:50 +0000 (05:21 +0000)]
Auto merge of #72844 - Dylan-DPC:rollup-i51qv5z, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72776 (fulfill: try using SmallVec or Box for stalled_on)
 - #72818 (Clean up E0622 explanation)
 - #72823 (Add descriptions for all queries)
 - #72832 (RELEASES.md: Expand `cargo tree` note to mention `cargo tree -d`)
 - #72834 (Rephrase term 'non-pointer type')

Failed merges:

r? @ghost

4 years agoCorrect generic parameter ordering in error note
camelid [Mon, 1 Jun 2020 03:45:08 +0000 (20:45 -0700)]
Correct generic parameter ordering in error note

4 years agoRollup merge of #72834 - JOE1994:correct_confusing_term, r=sfackler
Dylan DPC [Mon, 1 Jun 2020 01:14:16 +0000 (03:14 +0200)]
Rollup merge of #72834 - JOE1994:correct_confusing_term, r=sfackler

Rephrase term 'non-pointer type'

Hello :cat2: ,

If the reader assumes that 'pointer type's include 'smart pointer's,
the term 'non-pointer type' could mislead the reader to assume that
x should not be a smart pointer type. I tried to rephrase the term
'non-pointer type' to remove ambiguity in the doc comments.

closes #72335

Thank you for reviewing this PR! :superhero_woman:

4 years agoRollup merge of #72832 - joshtriplett:cargo-tree-d, r=Mark-Simulacrum
Dylan DPC [Mon, 1 Jun 2020 01:14:14 +0000 (03:14 +0200)]
Rollup merge of #72832 - joshtriplett:cargo-tree-d, r=Mark-Simulacrum

RELEASES.md: Expand `cargo tree` note to mention `cargo tree -d`

Useful feature that people might not automatically associate with `cargo
tree`.

4 years agoRollup merge of #72823 - matthewjasper:describe-queries, r=eddyb
Dylan DPC [Mon, 1 Jun 2020 01:14:12 +0000 (03:14 +0200)]
Rollup merge of #72823 - matthewjasper:describe-queries, r=eddyb

Add descriptions for all queries

This also removes the default description for queries with DefId keys and makes the macro validate that a description is provided.

cc  #72730
r? @eddyb

4 years agoRollup merge of #72818 - GuillaumeGomez:cleanup-e0622, r=Dylan-DPC
Dylan DPC [Mon, 1 Jun 2020 01:14:10 +0000 (03:14 +0200)]
Rollup merge of #72818 - GuillaumeGomez:cleanup-e0622, r=Dylan-DPC

Clean up E0622 explanation

r? @Dylan-DPC

4 years agoRollup merge of #72776 - lcnr:stalled_on-smallvec, r=nnethercote
Dylan DPC [Mon, 1 Jun 2020 01:14:05 +0000 (03:14 +0200)]
Rollup merge of #72776 - lcnr:stalled_on-smallvec, r=nnethercote

fulfill: try using SmallVec or Box for stalled_on

Tested both `Box` and `SmallVec` for `stalled_on`, with both resulting in a perf loss.
Adds a comment mentioning this and removes an now outdated FIXME.

Logging the length of `stalled_on` resulted in the following distribution while building a part of stage 1 libs:
```
22627647 counts:
(  1) 20983696 (92.7%, 92.7%): process_obligation_len: 1
(  2)   959711 ( 4.2%, 97.0%): process_obligation_len: 2
(  3)   682326 ( 3.0%,100.0%): process_obligation_len: 0
(  4)     1914 ( 0.0%,100.0%): process_obligation_len: 3
```
cc @eddyb
r? @nnethercote

4 years agoAuto merge of #72831 - Dylan-DPC:rollup-6rxjwt9, r=Dylan-DPC
bors [Sun, 31 May 2020 20:58:56 +0000 (20:58 +0000)]
Auto merge of #72831 - Dylan-DPC:rollup-6rxjwt9, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #72691 (Fix escape key handling)
 - #72807 (Avoid setting wrong obligation cause span of associated type mismatch)
 - #72812 (Miri tests: skip parts of test_char_range)
 - #72829 (Clarify terms in doc comments)
 - #72830 (Fix release notes for niche initialization change)

Failed merges:

r? @ghost

4 years agoRephrase term 'non-pointer type'
JOE1994 [Sun, 31 May 2020 19:58:06 +0000 (15:58 -0400)]
Rephrase term 'non-pointer type'
If the reader assumes that 'pointer type's include 'smart pointer's,
the term 'non-pointer type' could mislead the reader to assume that
x should not be a smart pointer type. I tried to rephrase the term
'non-pointer type' to remove ambiguity in the doc comments.

closes #72335

Thank you for reviewing this PR! :)

4 years agoRELEASES.md: Expand `cargo tree` note to mention `cargo tree -d`
Josh Triplett [Sun, 31 May 2020 19:39:28 +0000 (12:39 -0700)]
RELEASES.md: Expand `cargo tree` note to mention `cargo tree -d`

Useful feature that people might not automatically associate with `cargo
tree`.

4 years agoRollup merge of #72830 - rust-lang:sfackler-patch-1, r=Mark-Simulacrum
Dylan DPC [Sun, 31 May 2020 19:30:06 +0000 (21:30 +0200)]
Rollup merge of #72830 - rust-lang:sfackler-patch-1, r=Mark-Simulacrum

Fix release notes for niche initialization change

MaybeUninit is not affected by the linked PR.

4 years agoRollup merge of #72829 - JOE1994:clarify_terms, r=jonas-schievink
Dylan DPC [Sun, 31 May 2020 19:30:05 +0000 (21:30 +0200)]
Rollup merge of #72829 - JOE1994:clarify_terms, r=jonas-schievink

Clarify terms in doc comments

Doc comments of `copy_from_slice` say that people should use `clone_from_slice`
when 'src' doesn't implement `Copy`. However, 'src' is a reference and
it always implements `Copy`. The term 'src' should be fixed to `T`(element type of slice 'src') in
the doc comments.

Thank you for reviewing this PR :)  :smiley_cat:

4 years agoRollup merge of #72812 - RalfJung:miri-char-test, r=jonas-schievink
Dylan DPC [Sun, 31 May 2020 19:30:03 +0000 (21:30 +0200)]
Rollup merge of #72812 - RalfJung:miri-char-test, r=jonas-schievink

Miri tests: skip parts of test_char_range

The new `test_char_range` test takes forever in Miri as it loops over all values of `char`. This makes it skip most of them when being run in Miri.

4 years agoRollup merge of #72807 - xiaotianrandom:fix-assoc-type-diagnostics, r=estebank
Dylan DPC [Sun, 31 May 2020 19:30:01 +0000 (21:30 +0200)]
Rollup merge of #72807 - xiaotianrandom:fix-assoc-type-diagnostics, r=estebank

Avoid setting wrong obligation cause span of associated type mismatch

Removes code that sets wrong obligation cause span of associated type mismatch. See the linked issue for details.

Closes #72806.

4 years agoRollup merge of #72691 - GuillaumeGomez:escape-key-handling, r=kinnison
Dylan DPC [Sun, 31 May 2020 19:30:00 +0000 (21:30 +0200)]
Rollup merge of #72691 - GuillaumeGomez:escape-key-handling, r=kinnison

Fix escape key handling

Fixes #72647.

The problem was that you could have a timeout just after the moment you press "escape", putting back the results.

r? @kinnison

4 years agoAdd descriptions for all queries
Matthew Jasper [Sun, 31 May 2020 15:11:51 +0000 (16:11 +0100)]
Add descriptions for all queries

4 years agoFix release notes for niche initialization change
Steven Fackler [Sun, 31 May 2020 18:51:08 +0000 (14:51 -0400)]
Fix release notes for niche initialization change

MaybeUninit is not affected by the linked PR.

4 years agoClarify terms in doc comments
JOE1994 [Sun, 31 May 2020 18:37:26 +0000 (14:37 -0400)]
Clarify terms in doc comments
Doc comments of 'copy_from_slice' say that people should use 'clone_from_slice'
when 'src' doesn't implement 'Copy'. However, 'src' is a reference and
it always implements 'Copy'. The term 'src' should be fixed to 'T' in
the doc comments.

Thank you for reviewing this PR :)

4 years agochanged *nix to Unix-like
Miller [Sun, 31 May 2020 18:15:35 +0000 (00:15 +0600)]
changed *nix to Unix-like

4 years agoClarify errors and warnings about the transition to the new asm!
Amanieu d'Antras [Sun, 31 May 2020 17:11:03 +0000 (18:11 +0100)]
Clarify errors and warnings about the transition to the new asm!

4 years agoAuto merge of #72767 - pnkfelix:track-devirtualized-filenames-issue-70924, r=eddyb
bors [Sun, 31 May 2020 17:14:44 +0000 (17:14 +0000)]
Auto merge of #72767 - pnkfelix:track-devirtualized-filenames-issue-70924, r=eddyb

Track devirtualized filenames

Split payload of FileName::Real to track both real and virtualized paths.

(Such splits arise from metadata refs into libstd; the virtualized paths look like `/rustc/1.45.0/src/libstd/io/cursor.rs` rather than `/Users/felixklock/Dev/Mozilla/rust.git/src/libstd/io/cursor.rs`)

This way, we can emit the virtual name into things like the like the StableSourceFileId (as was done back before PR #70642) that ends up in incremental build artifacts, while still using the devirtualized file path when we want to access the file.

Fix #70924

4 years agoMake `remote-test-client` work as cargo runner again
Dennis Duda [Sun, 31 May 2020 15:36:17 +0000 (17:36 +0200)]
Make `remote-test-client` work as cargo runner again

Since cargo appends executable/args, the support_lib count
parameter has to come first.

4 years agoUpdate help text of remote-test-client to reflect changed command
Dennis Duda [Sun, 31 May 2020 13:20:52 +0000 (15:20 +0200)]
Update help text of remote-test-client to reflect changed command

4 years agoFix `set_permissions` call for non-windows
Dennis Duda [Fri, 29 May 2020 09:57:23 +0000 (11:57 +0200)]
Fix `set_permissions` call for non-windows

4 years agoUnify temp path generation for non-android
Dennis Duda [Thu, 28 May 2020 08:04:43 +0000 (10:04 +0200)]
Unify temp path generation for non-android

4 years agoMake remote-test-client and remote-test-server compatible with windows
Dennis Duda [Wed, 27 May 2020 19:58:12 +0000 (21:58 +0200)]
Make remote-test-client and remote-test-server compatible with windows

`compiletest` and `remote-test-client`:

The command line for `remote-test-client` was changed slightly
to allow cross-platform compatible paths. The old way of supplying
the support libs was by joining their paths with the executable path
with `:`. This caused Windows-style paths to be split after the
directory letter. Now, the number of support libs is provided
as a parameter as well, and the support lib paths are split off
from the regular args in the client.

`remote-test-server`:

- Marked Unix-only parts as such and implemented Windows alternatives
- On Windows `LD_LIBRARY_PATH` doesn't exist. Libraries are
  loaded from `PATH` though, so that's the way around it.
- Tiny cleanup: `Command::args`/`envs` instead of manually
  looping over them
- The temp path for Windows has to be set via environment variable,
  since there isn't a global temp directory that would work on every
  machine (as a static string)

4 years agoremove trivial calls to mk_const
Bastian Kauschke [Sun, 31 May 2020 15:16:44 +0000 (17:16 +0200)]
remove trivial calls to mk_const

4 years agoInstCombine: Don't optimize `&mut *x` into `x`
Jonas Schievink [Sun, 31 May 2020 14:22:23 +0000 (16:22 +0200)]
InstCombine: Don't optimize `&mut *x` into `x`

4 years agoAuto merge of #72813 - RalfJung:rollup-4ko6q8j, r=RalfJung
bors [Sun, 31 May 2020 13:39:05 +0000 (13:39 +0000)]
Auto merge of #72813 - RalfJung:rollup-4ko6q8j, r=RalfJung

Rollup of 5 pull requests

Successful merges:

 - #72683 (from_u32_unchecked: check validity, and fix UB in Wtf8)
 - #72715 (Account for trailing comma when suggesting `where` clauses)
 - #72745 (generalize Borrow<[T]> for Interned<'tcx, List<T>>)
 - #72749 (Update stdarch submodule to latest head)
 - #72781 (Use `LocalDefId` instead of `NodeId` in `resolve_str_path_error`)

Failed merges:

r? @ghost

4 years agoPut input timeout clearance inside a function
Guillaume Gomez [Sun, 31 May 2020 12:27:33 +0000 (14:27 +0200)]
Put input timeout clearance inside a function

4 years agoClean up E0622 explanation
Guillaume Gomez [Sun, 31 May 2020 12:09:15 +0000 (14:09 +0200)]
Clean up E0622 explanation

4 years agoMiri tests: skip parts of test_char_range
Ralf Jung [Sun, 31 May 2020 09:58:15 +0000 (11:58 +0200)]
Miri tests: skip parts of test_char_range

4 years agoRollup merge of #72781 - marmeladema:rustdoc-def-id-resolve-str-path-error, r=petroch...
Ralf Jung [Sun, 31 May 2020 10:03:30 +0000 (12:03 +0200)]
Rollup merge of #72781 - marmeladema:rustdoc-def-id-resolve-str-path-error, r=petrochenkov

Use `LocalDefId` instead of `NodeId` in `resolve_str_path_error`

Together with https://github.com/rust-lang/rust/pull/72777 this should remove all uses of `NodeId` in `rustdoc`.

cc #50928

r? @petrochenkov

4 years agoRollup merge of #72749 - vertexclique:vcq/update-stdarch, r=Amanieu
Ralf Jung [Sun, 31 May 2020 10:03:28 +0000 (12:03 +0200)]
Rollup merge of #72749 - vertexclique:vcq/update-stdarch, r=Amanieu

Update stdarch submodule to latest head

Includes avx512 work & aarch64 tme.

4 years agoRollup merge of #72745 - lcnr:interned-cleanup, r=petrochenkov
Ralf Jung [Sun, 31 May 2020 10:03:26 +0000 (12:03 +0200)]
Rollup merge of #72745 - lcnr:interned-cleanup, r=petrochenkov

generalize Borrow<[T]> for Interned<'tcx, List<T>>

4 years agoRollup merge of #72715 - estebank:trailing-comma-where, r=petrochenkov
Ralf Jung [Sun, 31 May 2020 10:03:24 +0000 (12:03 +0200)]
Rollup merge of #72715 - estebank:trailing-comma-where, r=petrochenkov

Account for trailing comma when suggesting `where` clauses

Fix #72693.

4 years agoRollup merge of #72683 - RalfJung:char-debug-check, r=Mark-Simulacrum
Ralf Jung [Sun, 31 May 2020 10:03:22 +0000 (12:03 +0200)]
Rollup merge of #72683 - RalfJung:char-debug-check, r=Mark-Simulacrum

from_u32_unchecked: check validity, and fix UB in Wtf8

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

4 years agoAuto merge of #72759 - alexcrichton:update-compiler-builtins, r=Mark-Simulacrum
bors [Sun, 31 May 2020 09:54:44 +0000 (09:54 +0000)]
Auto merge of #72759 - alexcrichton:update-compiler-builtins, r=Mark-Simulacrum

Update compiler-builtins

Pulls in a fix for #72758, more details on the linked issue.

[Crate changes included here][changes]

[changes]: https://github.com/rust-lang/compiler-builtins/compare/0.1.28...0.1.31

Closes #72758

4 years agoremove fixme for `stalled_on`
Bastian Kauschke [Sun, 31 May 2020 07:58:28 +0000 (09:58 +0200)]
remove fixme for `stalled_on`

4 years agoAuto merge of #72743 - lcnr:predicate_f, r=nikomatsakis
bors [Sun, 31 May 2020 04:44:38 +0000 (04:44 +0000)]
Auto merge of #72743 - lcnr:predicate_f, r=nikomatsakis

fix EncodeWithShorthand for Predicate

r? @nikomatsakis

4 years agoFix associate type diagnostics
XIAO Tian [Sat, 30 May 2020 03:26:46 +0000 (11:26 +0800)]
Fix associate type diagnostics

4 years agoAdd a test for wrong assoc type diagnostics
XIAO Tian [Sat, 30 May 2020 03:28:33 +0000 (11:28 +0800)]
Add a test for wrong assoc type diagnostics

4 years agoAuto merge of #72116 - petrhosek:fuchsia-ld-flags, r=tmandry
bors [Sun, 31 May 2020 01:07:37 +0000 (01:07 +0000)]
Auto merge of #72116 - petrhosek:fuchsia-ld-flags, r=tmandry

Update the Fuchsia linker defaults

This updates the linker defaults aligning them with Clang. Specifically,
we use 4K pages on all platforms, we always use BIND_NOW, we prefer all
loadable segments be separate and page aligned, and we support RELR
relocations.

4 years agoUpdate stdarch submodule to latest head
Mahmut Bulut [Fri, 29 May 2020 18:28:18 +0000 (20:28 +0200)]
Update stdarch submodule to latest head

4 years agoAdd a test for `$:ident` in proc macro input
Vadim Petrochenkov [Sat, 30 May 2020 21:20:06 +0000 (00:20 +0300)]
Add a test for `$:ident` in proc macro input

4 years agoAuto merge of #72794 - RalfJung:rollup-gzs4nl4, r=RalfJung
bors [Sat, 30 May 2020 21:23:19 +0000 (21:23 +0000)]
Auto merge of #72794 - RalfJung:rollup-gzs4nl4, r=RalfJung

Rollup of 13 pull requests

Successful merges:

 - #72543 (Account for missing lifetime in opaque and trait object return types)
 - #72625 (Improve inline asm error diagnostics)
 - #72637 (expand `env!` with def-site context)
 - #72650 (Sort sidebar elements)
 - #72657 (Allow types (with lifetimes/generics) in impl_lint_pass)
 - #72666 (Add -Z profile-emit=<path> for Gcov gcda output.)
 - #72668 (Fix missing parentheses Fn notation error)
 - #72669 (rustc_session: Cleanup session creation)
 - #72728 (Make bootstrap aware of relative libdir in stage0 compiler)
 - #72757 (rustc_lexer: Optimize shebang detection slightly)
 - #72772 (miri validation: clarify valid values of 'char')
 - #72773 (Fix is_char_boundary documentation)
 - #72777 (rustdoc: remove calls to `local_def_id_from_node_id`)

Failed merges:

r? @ghost

4 years agotest-macros: Avoid always producing errors in `#[derive(Print)]`
Vadim Petrochenkov [Sat, 30 May 2020 21:04:57 +0000 (00:04 +0300)]
test-macros: Avoid always producing errors in `#[derive(Print)]`

4 years agoRollup merge of #72777 - marmeladema:rustdoc-remove-local-def-id-from-node-id, r...
Ralf Jung [Sat, 30 May 2020 21:09:04 +0000 (23:09 +0200)]
Rollup merge of #72777 - marmeladema:rustdoc-remove-local-def-id-from-node-id, r=petrochenkov

rustdoc: remove calls to `local_def_id_from_node_id`

rustdoc calls `local_def_id_from_node_id(CRATE_NODE_ID)` when it can just creates a top level `DefId` using `DefId::local(CRATE_DEF_INDEX)`.

cc #50928

r? @petrochenkov

4 years agoRollup merge of #72773 - Rantanen:is_char_boundary-docs, r=joshtriplett
Ralf Jung [Sat, 30 May 2020 21:09:02 +0000 (23:09 +0200)]
Rollup merge of #72773 - Rantanen:is_char_boundary-docs, r=joshtriplett

Fix is_char_boundary documentation

Given the "start _and/or end_" wording in the original, the way I understood it was that the `str::is_char_boundary` method would also return `true` for the last byte in a UTF-8 code point sequence. (Which would have meant that for a string consisting of nothing but 1 and 2 byte UTF-8 code point sequences, it would return nothing but `true`.)

In practice the method returns `true` only for the starting byte of each sequence and the end of the string: [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e9f5fc4d6bf2f1bf57a75f3c9a180770)

I was also somewhat tempted to remove the _The start and end of the string are considered to be boundaries_, since that's implied by the first sentence, but I decided to avoid bikeshedding over it and left it as it was since it's not wrong in relation to how the method behaves.

4 years agoRollup merge of #72772 - RalfJung:valid-char, r=petrochenkov
Ralf Jung [Sat, 30 May 2020 21:09:00 +0000 (23:09 +0200)]
Rollup merge of #72772 - RalfJung:valid-char, r=petrochenkov

miri validation: clarify valid values of 'char'

The old text said "expected a valid unicode codepoint", which is not actually correct -- it has to be a scalar value (which is a code point that is not part of a surrogate pair).