Commit Graph

101635 Commits

Author SHA1 Message Date
Tyler Mandry
1918205891
Rollup merge of #65471 - GuillaumeGomez:long-err-explanation-E0578, r=Dylan-DPC
Add long error explanation for E0578

Part of #61137

r? @kinnison
2019-11-01 11:20:11 -07:00
Tyler Mandry
7297cd8d92
Rollup merge of #65470 - traxys:fix_65401, r=michaelwoerister
Don't hide ICEs from previous incremental compiles

I think this fixes #65401, the compiler does not fail to ICE after the first compilation, tested on the last snippet of [this comment](https://github.com/rust-lang/rust/issues/63154#issuecomment-541592381).
I am not very sure of the fix as I don't understand much of the structure of the compiler.
2019-11-01 11:20:09 -07:00
Tyler Mandry
9175247e72
Rollup merge of #65112 - jack-t:type-parens-lint, r=varkor
Add lint and tests for unnecessary parens around types

This is my first contribution to the Rust project, so I apologize if I'm not doing things the right way.

The PR fixes #64169. It adds a lint and tests for unnecessary parentheses around types. I've run `tidy` and `rustfmt` — I'm not totally sure it worked right, though — and I've tried to follow the instructions linked in the readme.

I tried to think through all the variants of `ast::TyKind` to find exceptions to this lint, and I could only find the one mentioned in the original issue, which concerns types with `dyn`. I'm not a Rust expert, thought, so I may well be missing something.

There's also a problem with getting this to build. The new lint catches several things in the, e.g., `core`. Because `x.py` seems to build with an equivalent of `-Werror`, what would have been warnings cause the build to break. I got it to build and the tests to pass with `--warnings warn` on my `x.py build` and `x.py test` commands.
2019-11-01 11:20:07 -07:00
Felix S. Klock II
6457914ff6 ui test formulation of regression test for issue 64872.
(Many thanks to alex for 1. making this even smaller than what I had
originally minimized, and 2. pointing out that there is precedent for
having ui tests with crate dependency chains of length > 2, thus
allowing me to avoid encoding this as a run-make test.)
2019-11-01 15:06:21 +01:00
Felix S. Klock II
d21f9b7fd6 targeted revert of PR rust-lang/rust#64324 (just undo change to dylib generics export).
Includes the anticipated fallout to run-make-fulldeps test suite from
this change. (We need to reopen issue 64319 as part of landing this.)
2019-11-01 15:05:45 +01:00
bors
01e5d91482 Auto merge of #65718 - eddyb:codegen-var-debuginfo, r=nikomatsakis
rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen.

These are all the codegen changes necessary for #56231.

The refactors were performed locally to codegen, and in several steps, to ease reviewing and avoid introducing changes in behavior (as I'm not sure our debuginfo tests cover enough).

r? @michaelwoerister cc @nagisa @rkruppe @oli-obk
2019-11-01 11:34:51 +00:00
Erin Power
5fb4111131
Updated RELEASES.md for 1.39.0 2019-11-01 09:30:21 +01:00
bors
253fc0ed74 Auto merge of #65698 - msizanoen1:dual-proc-macro-hash, r=petrochenkov
Dual proc macro hash

This PR changes current `-Z dual-proc-macro` mechanism from resolving only by name to including the hash of the host crate inside the transistive dependency information to prevent name conflicts.
Fix partially #62558
2019-11-01 06:35:40 +00:00
bors
472e6787f0 Auto merge of #65459 - ecstatic-morse:graphviz-subgraph, r=estebank
Fix `-Zunpretty=mir-cfg` to render multiple items

`-Zunpretty=mir-cfg` outputs DOT to stdout for all items being compiled. However, it puts all of these items in separate `digraph`s, which means the result of redirecting that output to a file is not valid. Most dot renderers (I have tried `dot` and `xdot`) cannot render the output.

This PR checks to see if `write_mir_graphviz` will  process multiple items, and writes them each as a `subgraph` in a single, top-level `digraph`. As a result, DOT can be viewed without manually editing the output file. The output is unchanged when printing a single item (e.g.`-Zunpretty=mir-cfg=item_name`).

Here's the output of `xdot` for a rust file containing three items:
![three-items](https://user-images.githubusercontent.com/29463364/66889712-4bf62200-ef98-11e9-83b5-60faa2a300dd.png)

The borders are a result of the nonstandard–but well-supported–[`cluster` prefix](https://graphviz.gitlab.io/_pages/doc/info/lang.html) (search for "Subgraphs and Clusters"). They will not appear if your renderer does not support this extension, but the graph will still render properly.
2019-11-01 03:15:31 +00:00
Eduard-Mihai Burtescu
60a22665c8 rustc_codegen_ssa: introduce MIR VarDebugInfo, but only for codegen. 2019-10-31 20:25:57 +02:00
Eduard-Mihai Burtescu
1e42072673 rustc_codegen_ssa: hide address ops from the declare_local interface. 2019-10-31 20:25:56 +02:00
Eduard-Mihai Burtescu
c2e7743da8 rustc_codegen_ssa: move debuginfo scopes into FunctionDebugContext. 2019-10-31 20:25:55 +02:00
Eduard-Mihai Burtescu
06869b8d17 rustc_codegen_ssa: change set_var_name back to taking a &str. 2019-10-31 20:25:54 +02:00
Eduard-Mihai Burtescu
5f4ee36e03 rustc_codegen_ssa: move all set_var_name calls to mir::debuginfo. 2019-10-31 20:25:42 +02:00
Eduard-Mihai Burtescu
c58e6b5752 rustc_codegen_ssa: move local variable debuginfo to mir::debuginfo. 2019-10-31 20:00:16 +02:00
Eduard-Mihai Burtescu
5059a3c7d4 rustc_codegen_ssa: move debuginfo-related things to a new mir::debuginfo module. 2019-10-31 20:00:15 +02:00
Eduard-Mihai Burtescu
27e01a1f88 syntax: disable the new early feature-gatings added in #65742. 2019-10-31 19:34:06 +02:00
Eduard-Mihai Burtescu
803616a73d Revert "pre-expansion gate trait_alias."
This reverts commit 2d182b82ce.
2019-10-31 19:08:13 +02:00
Eduard-Mihai Burtescu
56d7bb2133 Revert "pre-expansion gate associated_type_bounds"
This reverts commit c17a1fd7d0.
2019-10-31 19:08:12 +02:00
Eduard-Mihai Burtescu
b05d36228e Revert "pre-expansion gate crate_visibility_modifier"
This reverts commit 04c661ba02.
2019-10-31 19:08:12 +02:00
Eduard-Mihai Burtescu
8f1eb345ea Revert "pre-expansion gate const_generics"
This reverts commit 49cbfa1a6f.
2019-10-31 19:08:12 +02:00
Eduard-Mihai Burtescu
ada4a6430d Revert "pre-expansion gate decl_macro"
This reverts commit 1f470ceac2.
2019-10-31 19:08:12 +02:00
Eduard-Mihai Burtescu
680089c2d9 Revert "pre-expansion gate box_patterns"
This reverts commit 2aff6b36d7.
2019-10-31 19:08:11 +02:00
Eduard-Mihai Burtescu
4c48355c69 Revert "pre-expansion gate exclusive_range_pattern"
This reverts commit 665a876e30.
2019-10-31 19:08:11 +02:00
Eduard-Mihai Burtescu
8645ac4218 Revert "pre-expansion gate try_blocks"
This reverts commit 1935ba658c.
2019-10-31 19:08:11 +02:00
Eduard-Mihai Burtescu
73bde2f0ce Revert "pre-expansion gate label_break_value"
This reverts commit 137ded8ab1.
2019-10-31 19:08:10 +02:00
Eduard-Mihai Burtescu
20bfff66a9 Revert "pre-expansion gate box_syntax"
This reverts commit e4ed886578.
2019-10-31 19:08:10 +02:00
Eduard-Mihai Burtescu
4c947a26f2 Revert "pre-expansion gate type_ascription"
This reverts commit 15a6c09b6e.
2019-10-31 19:08:10 +02:00
Lzu Tao
7b72c2831c Stabilize float_to_from_bytes feature 2019-10-31 16:13:28 +00:00
n-salim
be0e381ab4
Merge pull request #42 from Wind-River/master_003
vxWorks: remove all code related to UNIX socket as it is not supporte…
2019-10-31 09:10:42 -07:00
bors
aa4e57ca8f Auto merge of #65091 - sekineh:into-iter-sorted, r=KodrAus
Implement ordered/sorted iterators on BinaryHeap as per #59278

I've implemented the ordered version of iterator on BinaryHeap as per #59278.

# Added methods:

* `.into_iter_sorted()`
  * like `.into_iter()`; but returns elements in heap order
* `.drain_sorted()`
  * like `.drain()`; but returns elements in heap order
  * It's a bit _lazy_; elements are removed on drop. (Edit: it’s similar to vec::Drain)

For `DrainSorted` struct, I implemented `Drop` trait following @scottmcm 's [suggestion](https://github.com/rust-lang/rust/issues/59278#issuecomment-537306925)

# ~TODO~ DONE
* ~I think I need to add more tests other than doctest.~

# **Notes:**
* we renamed `_ordered` to `_sorted`, because the latter is more common in rust libs. (as suggested by @KodrAus )
2019-10-31 15:15:53 +00:00
Guillaume Gomez
bfe9c9e429 update ui tests 2019-10-31 14:27:16 +01:00
Guillaume Gomez
9c2f1dd377 Add long error explanation for E0578 2019-10-31 14:27:16 +01:00
Santiago Pastorino
18391b62f3
Fix outdated rustdoc of Once::init_locking function 2019-10-31 10:06:14 -03:00
bors
92df638162 Auto merge of #63803 - GuillaumeGomez:stabilize-doctest, r=ollie27,QuietMisdreavus,Mark-Simulacrum
[rustdoc] stabilize cfg(doctest)

Fixes #62210.

Since we removed rustdoc from providing cfg(test) on test runs, it's been replaced by cfg(doctest). It'd be nice to have it in not too far in the future.
2019-10-31 11:51:42 +00:00
Guillaume Gomez
fcbf77ef16 Update ui tests 2019-10-31 10:39:46 +01:00
Guillaume Gomez
5dfb167bf3 Create new error E0743 2019-10-31 10:39:38 +01:00
bors
b3a0350c2b Auto merge of #65982 - RalfJung:miri, r=alexcrichton
update miri

As a side-effect, this bumps env_logger from 0.7.0 to 0.7.1.

Fixes https://github.com/rust-lang/rust/issues/65889
2019-10-31 08:31:27 +00:00
Ohad Ravid
8bb5450128 Fix incorrect diagnostics for expected type in E0271 with an associated type 2019-10-31 09:30:14 +01:00
Daniel Silverstone
c24a099e8b
rustdoc: Resolve module-level doc references more locally
Module level docs should resolve intra-doc links as locally as
possible.  As such, this commit alters the heuristic for finding
intra-doc links such that we attempt to resolve names mentioned
in *inner* documentation comments within the (sub-)module rather
that from the context of its parent.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-10-31 07:49:54 +00:00
Ralf Jung
9cd1edea4a rebase and re-update lock file 2019-10-31 07:50:54 +01:00
Ralf Jung
64cf596ca6 update miri 2019-10-31 07:50:27 +01:00
msizanoen1
8a0d2332f9 Adjust rustc-workspace-hack 2019-10-31 13:12:35 +07:00
msizanoen
0a21018d14 Implement dual proc macro hashing
This changes the mechanism of `-Z dual-proc-macro` to record the host
proc macro hash in the transistive dependency information and use it
during dependency resolution instead of resolving only by name.
2019-10-31 13:12:35 +07:00
bors
2f16be42dd Auto merge of #65990 - Centril:rollup-v843h4a, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #65274 (Upload toolstates.json to rust-lang-ci2)
 - #65434 (Add long error explanation for E0577)
 - #65850 (Update comments re type parameter hack in object safety)
 - #65955 (ci: revert msys2 ca-certificates hack)
 - #65959 (Fix an incorrect docstring for Immediate in librustc_mir/interpret.)
 - #65979 (Switch CrateMetadata's source_map_import_info from RwLock to Once)
 - #65981 (work around aggressive syntax feature gating)

Failed merges:

r? @ghost
2019-10-31 02:20:30 +00:00
Mazdak Farrokhzad
83000c29ba
Rollup merge of #65981 - RalfJung:check-your-gates, r=Centril
work around aggressive syntax feature gating

This works around https://github.com/rust-lang/rust/issues/65860; fixing `rustc +nightly lib.rs --test --edition 2018` for libcore and thus unblocking https://github.com/RalfJung/miri-test-libstd.
2019-10-31 02:54:12 +01:00
Mazdak Farrokhzad
30ed544948
Rollup merge of #65979 - spastorino:crate-metadata-mutexes, r=Mark-Simulacrum
Switch CrateMetadata's source_map_import_info from RwLock to Once
2019-10-31 02:54:11 +01:00
Mazdak Farrokhzad
60fa6d8ac2
Rollup merge of #65959 - vext01:immediate-docstring, r=davidtwco
Fix an incorrect docstring for Immediate in librustc_mir/interpret.

I suspect `Immediate` was once called `Value`?
2019-10-31 02:54:10 +01:00
Mazdak Farrokhzad
ce64b170eb
Rollup merge of #65955 - pietroalbini:master-revert-msys2-hack, r=Mark-Simulacrum
ci: revert msys2 ca-certificates hack

The hack was added because upstream msys2 broke the ca-certificates package, but since then it has been fixed. This reverts CI to use the upstream package.

Part of #65767
2019-10-31 02:54:08 +01:00
Mazdak Farrokhzad
97b9d1023d
Rollup merge of #65850 - mikeyhew:patch-1, r=nikomatsakis
Update comments re type parameter hack in object safety

To check if a method's receiver type is object safe, we create a new receiver type by substituting in a bogus type parameter (let's call it `U`) for `Self`, and checking that the unmodified receiver type implements `DispatchFromDyn<receiver type with Self = U>`. It would be better to use `dyn Trait` directly, and the only reason we don't is because it triggers another check that `Trait` is object safe, resulting in a query cycle. Once the feature `object_safe_for_dispatch` (tracking issue https://github.com/rust-lang/rust/issues/43561) is stabilized, this will no longer be the case, and we'll be able to use `dyn Trait` as the unsized `Self` type. I've updated the comments in object_safety.rs accordingly.

cc @Centril @nikomatsakis @bovinebuddha
2019-10-31 02:54:07 +01:00