Commit Graph

121188 Commits

Author SHA1 Message Date
Dylan DPC
0050b8817b
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.
2020-06-03 02:39:07 +02:00
Dylan DPC
69a1ac3891
Rollup merge of #72848 - camelid:fix-72815, r=varkor
Correct generic parameter ordering in error note for E0747

Fixes #72815.

r? @varkor
2020-06-03 02:39:05 +02:00
Dylan DPC
9c3ac0c9bb
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
2020-06-03 02:39:03 +02:00
Dylan DPC
b47896492c
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
```
2020-06-03 02:38:59 +02:00
bors
fe10f1a49f 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
2020-06-02 16:30:44 +00:00
Dylan DPC
bed597a220
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`
2020-06-02 18:30:05 +02:00
Dylan DPC
de1a767481
Rollup merge of #72914 - petertodd:2020-minor-at-most-32, r=jonas-schievink
Minor: off-by-one error in RELEASES.md
2020-06-02 18:30:03 +02:00
Dylan DPC
9763e0c089
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 ?
2020-06-02 18:29:59 +02:00
Dylan DPC
466d3e702a
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?
2020-06-02 18:29:57 +02:00
DutchGhost
503048c4d9
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`
2020-06-02 16:12:36 +02:00
Peter Todd
786ad87d40
Minor: off-by-one error in RELEASES.md 2020-06-02 09:47:33 -04:00
Tom Eccles
81df5ac241 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.
2020-06-02 14:00:18 +01:00
Tom Eccles
9e137bb8b6 tools/remote-test-server: make use of verbose option
There was an unused verbose command line argument. Add some prints if
verbose is set.
2020-06-02 14:00:18 +01:00
Tom Eccles
1b7ec76c16 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.
2020-06-02 14:00:18 +01:00
bors
eeaf497b2a 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)
2020-06-02 07:54:38 +00:00
bors
10c2316a6b 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
2020-06-02 04:10:49 +00:00
Yuki Okushi
b7ec7bd5b7
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
2020-06-02 13:07:27 +09:00
Yuki Okushi
f388007249
Rollup merge of #72891 - lzutao:wrapping_int-max, r=sfackler
Add associated consts MIN/MAX for Wrapping<Int>
2020-06-02 13:07:25 +09:00
Yuki Okushi
bec91cab56
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.
2020-06-02 13:07:24 +09:00
Yuki Okushi
56c8f0fa12
Rollup merge of #72886 - xfix:patch-21, r=jonas-schievink
Remove allow missing_debug_implementations for MaybeUninit

It already has a Debug implementation.
2020-06-02 13:07:22 +09:00
Yuki Okushi
b3cf989eaf
Rollup merge of #72880 - GuillaumeGomez:cleanup-e0637, r=Dylan-DPC
Clean up E0637 explanation

r? @Dylan-DPC
2020-06-02 13:07:20 +09:00
Yuki Okushi
611da23645
Rollup merge of #72827 - milrope:patch-1, r=nikomatsakis
changed *nix to Unix-like
2020-06-02 13:07:18 +09:00
Yuki Okushi
0007924cd0
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.
2020-06-02 13:07:17 +09:00
Yuki Okushi
f1732f66ff
Rollup merge of #72822 - lcnr:intern-me, r=estebank
remove trivial calls to mk_const

similar to #72754
2020-06-02 13:07:15 +09:00
Yuki Okushi
db0c346395
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
2020-06-02 13:07:13 +09:00
Yuki Okushi
8a68fc6ff4
Rollup merge of #72775 - JohnTitor:await-sugg, r=estebank
Return early to avoid ICE

Fixes #72766
2020-06-02 13:07:12 +09:00
Josh Stone
a3344d1a3a Add a test to ensure Fuse stays covariant 2020-06-01 17:47:26 -07:00
Ralf Jung
4f30c68937
Fix comment
Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
2020-06-02 00:55:11 +02:00
Julian Wollersberger
7be8077b3f Cleanup: Inline struct_span_fatal(), which is only called once, and remove an outdated FIXME. 2020-06-01 22:01:30 +02:00
Julian Wollersberger
5fbbfbbfa9 Simplify raw string error reporting.
This makes `UnvalidatedRawStr` and `ValidatedRawStr` unnecessary and removes 70 lines.
2020-06-01 22:01:19 +02:00
Camelid
56f87efa2c
Include kind in bug!
Co-authored-by: hafiz <20735482+ayazhafiz@users.noreply.github.com>
2020-06-01 13:01:01 -07:00
bors
ad4bc3323b 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
2020-06-01 19:03:23 +00:00
Ralf Jung
d022603a45 test miri-unleash TLS accesses 2020-06-01 20:53:45 +02:00
Ralf Jung
759e495bbf bump Miri, update for cargo-miri being a separate project 2020-06-01 20:17:26 +02:00
Camelid
fd76d236e4
Use bug! instead of panic!
Co-authored-by: varkor <github@varkor.com>
2020-06-01 10:52:07 -07:00
Lzu Tao
b2c44696ad Add associated consts MIN/MAX for Wrapping<Int> 2020-06-01 17:03:47 +00:00
Alex Crichton
0fd9a37ff4 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.
2020-06-01 08:33:07 -07:00
Alexis Bourget
d8cc2c1e4f Add a warning about infinite reading in read_(until|line) 2020-06-01 16:19:10 +02:00
Konrad Borowski
664222a4e2
Remove allow missing_debug_implementations for MaybeUninit
It already has a Debug implementation.
2020-06-01 15:36:45 +02:00
bors
d3cba254e4 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
2020-06-01 11:44:51 +00:00
Guillaume Gomez
576a97b6d1 Clean up E0637 explanation 2020-06-01 13:07:29 +02:00
bors
b85e3fe010 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
2020-06-01 05:21:50 +00:00
camelid
718d28cf85 Correct generic parameter ordering in error note 2020-05-31 20:45:08 -07:00
Dylan DPC
16b4dc0489
Rollup merge of #72834 - JOE1994:correct_confusing_term, r=sfackler
Rephrase term 'non-pointer type'

Hello 🐈 ,

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! 🦸‍♀️
2020-06-01 03:14:16 +02:00
Dylan DPC
b6a5fea2ce
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`.
2020-06-01 03:14:14 +02:00
Dylan DPC
cf4683665f
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
2020-06-01 03:14:12 +02:00
Dylan DPC
2e3417a82d
Rollup merge of #72818 - GuillaumeGomez:cleanup-e0622, r=Dylan-DPC
Clean up E0622 explanation

r? @Dylan-DPC
2020-06-01 03:14:10 +02:00
Dylan DPC
fa2943975a
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
2020-06-01 03:14:05 +02:00
bors
0d93d3f4a4 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
2020-05-31 20:58:56 +00:00
JOE1994
3048a41a5a 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! :)
2020-05-31 15:58:06 -04:00