121390 Commits

Author SHA1 Message Date
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
Dylan MacKenzie
b4e06b9e88 Call skip_binder or no_bound_vars before self_ty 2020-06-01 12:18:57 -07:00
Dylan MacKenzie
eaa57cfb71 PolyTraitRef::self_ty returns Binder<Ty> 2020-06-01 12:12:26 -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
Esteban Küber
eb8d9002fa Add test for #72554. 2020-06-01 09:44:05 -07: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
Aaron Hill
717fd665ad
Make SourceMap available for early debug-printing of Spans
Normally, we debug-print `Spans` using the `SourceMap` retrieved from
the global `TyCtxt`. However, we fall back to printing out the `Span`'s
raw fields (instead of a file and line number) when we try to print a
`Span` before a `TyCtxt` is available. This makes debugging early phases
of the compile, such as parsing, much more difficult.

This commit stores a `SourceMap` in `rustc_span::GlOBALS` as a fallback.
When a `TyCtxt` is not available, we try to retrieve one from `GLOBALS`
- only if this is not available do we fall back to the raw field output.

I'm not sure how to write a test for this - however, this can be
verified locally by setting `RUSTC_LOG="rustc_parse=debug"`, and
verifying that the output contains filenames and line numbers.
2020-05-31 17:30:55 -04: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
Josh Triplett
32736606fd RELEASES.md: Expand cargo tree note to mention cargo tree -d
Useful feature that people might not automatically associate with `cargo
tree`.
2020-05-31 12:39:28 -07:00
Dylan DPC
76e0ecca2b
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.
2020-05-31 21:30:06 +02:00
Dylan DPC
2d4ed2aedd
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 :)  😺
2020-05-31 21:30:05 +02:00
Dylan DPC
5480120b26
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.
2020-05-31 21:30:03 +02:00
Dylan DPC
8e83a7e126
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.
2020-05-31 21:30:01 +02:00
Dylan DPC
6cd9a67314
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
2020-05-31 21:30:00 +02:00
Matthew Jasper
8894bd220b Add descriptions for all queries 2020-05-31 20:15:32 +01:00
Steven Fackler
0a71ba2243
Fix release notes for niche initialization change
MaybeUninit is not affected by the linked PR.
2020-05-31 14:51:08 -04:00
JOE1994
dd0338fbac 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 :)
2020-05-31 14:37:26 -04:00
Miller
186b274fd9
changed *nix to Unix-like 2020-06-01 00:15:35 +06:00
Amanieu d'Antras
d49020573c Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
bors
5fd2f06e99 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
2020-05-31 17:14:44 +00:00
Dennis Duda
036da3a6dc Make remote-test-client work as cargo runner again
Since cargo appends executable/args, the support_lib count
parameter has to come first.
2020-05-31 17:36:17 +02:00
Dennis Duda
0199fdc0f7 Update help text of remote-test-client to reflect changed command 2020-05-31 17:23:46 +02:00
Dennis Duda
577ac2f836 Fix set_permissions call for non-windows 2020-05-31 17:23:46 +02:00
Dennis Duda
41d540fcb7 Unify temp path generation for non-android 2020-05-31 17:23:46 +02:00
Dennis Duda
a367956100 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-05-31 17:23:46 +02:00
Bastian Kauschke
9f83d36edc remove trivial calls to mk_const 2020-05-31 17:16:55 +02:00
Jonas Schievink
309661e84f InstCombine: Don't optimize &mut *x into x 2020-05-31 16:22:23 +02:00
bors
f6072cab13 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
2020-05-31 13:39:05 +00:00
Ralf Jung
f793c0b1bf always print MIR Location when validator finds a problem 2020-05-31 15:23:45 +02:00
Ralf Jung
9a4bdbff9e more checks for SwitchInt 2020-05-31 15:07:16 +02:00
Ralf Jung
e07e42433f replace DUMMY_SP by proper span 2020-05-31 14:49:33 +02:00