Commit Graph

70549 Commits

Author SHA1 Message Date
kennytm
662f902746 Rollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus
Hide private trait type params and show hidden items with document-private

As discussed in #46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc.

The second commit removes the trait implementation from the docs if the trait's parameter is private.
2017-12-02 01:39:03 +08:00
kennytm
3f99b7c993 Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank
rustc: Filter out bogus extern crate warnings

Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.

The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.

The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...

Closes #46271
2017-12-02 01:39:02 +08:00
kennytm
bd5a4af5cd Rollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1
wasm: Update LLVM to fix a test

This commit updates LLVM with some tweaks to the integer <-> floating point
conversion instructions to ensure that `as` in Rust doesn't trap.

Closes #46298
2017-12-02 01:39:01 +08:00
kennytm
b86a47f860 Rollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb
incr.comp.: Make traits::VTable encodable and decodable.

Make vtables encodable so we can cache the `trans_fulfill_obligation` query at some point.

r? @eddyb
2017-12-02 01:39:00 +08:00
kennytm
edaec072b9 Rollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus
Invert colors in important traits tooltip

Part of #46352.

r? @QuietMisdreavus
2017-12-02 01:38:59 +08:00
kennytm
bc8e8fabbf Rollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus
Fix rustdoc item summaries that are headers

Rustoc item summaries that are headers were not displayed at all because
they started with whitespace.

This PR fixes this and now removes the whitespace and then displays the
block.

I'm not sure if the rustdoc test is written correctly, if there's anything to improve, just let me know. :)

This fixes #46377.

This is how it looks when rendered out now:
![Rendered](https://i.imgur.com/7u8jUAM.png)
2017-12-02 01:38:58 +08:00
kennytm
ae24366251 Rollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum
Remove librustdoc dependency on env_logger

We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc

Closes #46383
2017-12-02 01:38:57 +08:00
kennytm
2341f6c4e5 Rollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum
rustbuild: Fix a typo with the Cargo book

The usage of `Path::new` prevented out-of-tree builds (like the bots do) from
working by accident!

Closes #46195
2017-12-02 01:38:56 +08:00
kennytm
613da5c1f4 Rollup merge of #46376 - SimonSapin:cargoup, r=kennytm
Update Cargo to Wed Nov 29 15:19:05 2017 +0000

5bb478a518

Pick up `workspace.default-members` support: https://github.com/rust-lang/cargo/pull/4743
2017-12-02 01:38:55 +08:00
kennytm
9493d4b95c Rollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm
NetBSD: add sysctl backend for std::env::current_exe

Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
preference over the /proc/curproc/exe symlink.

Additionally, perform more validation of aformentioned symlink.
Particularly on pre-8.x NetBSD this symlink will point to '/' when
accurate information is unavailable.
2017-12-02 01:38:54 +08:00
kennytm
263eb4d7ef Rollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton
rustc_llvm: remove stale references

...that were removed in 77c3bfa742.

r? @alexcrichton
2017-12-02 01:38:53 +08:00
kennytm
95f465d535 Rollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis
make coercions to `!` in unreachable code a hard error

This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.
2017-12-02 01:38:52 +08:00
Eduard-Mihai Burtescu
473f044225 MIR: s/lv(al(ue)?)?/place in function/variable/module names. 2017-12-01 18:48:57 +02:00
Eduard-Mihai Burtescu
511743c438 MIR: s/Lvalue/Place in type names. 2017-12-01 18:47:36 +02:00
bors
6805b016ef Auto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis
incr.comp.: Load cached diagnostics lazily and allow more things in the cache.

This PR implements makes two changes:
1. Diagnostics are loaded lazily from the incr. comp. cache now. This turned out to be necessary for correctness because diagnostics contain `Span` values and deserializing those requires that the source file they point to is still around in the current compilation session. Obviously this isn't always the case. Loading them lazily allows for never touching diagnostics that are not valid anymore.
2. The compiler can now deal with there being no cache entry for a given query invocation. Before, all query results of a cacheable query were always expected to be present in the cache. Now, the compiler can fall back to re-computing the result if there is no cache entry found. This allows for caching things that we cannot force from dep-node (like the `symbol_name` query). In such a case we'll just have a "best effort" caching strategy.

~~This PR is based on https://github.com/rust-lang/rust/pull/46301 (=first 2 commits), so please don't merge until that has landed. The rest of the commits are ready for review though.~~

r? @nikomatsakis
2017-12-01 16:01:22 +00:00
Michael Woerister
966eead9ec incr.comp.: Fix merge fallout. 2017-12-01 14:29:20 +01:00
bors
e3ed21272d Auto merge of #46236 - davidtwco:issue-46023, r=arielb1
MIR-borrowck: immutable unique closure upvars can be mutated

Fixes #46023 and #46160 (see [this comment](https://github.com/rust-lang/rust/pull/46236#issuecomment-347204874)).
2017-12-01 13:26:10 +00:00
Michael Woerister
410f8509b5 incr.comp.: Use the awesome new '_ in a few places. 2017-12-01 13:48:59 +01:00
Michael Woerister
c531d9f733 incr.comp.: Allow for recovering from missing on-disk cache entries. 2017-12-01 13:48:59 +01:00
Michael Woerister
059bd80526 incr.comp.: Load diagnostics from previous session lazily and clean up on-disk-cache persistence code. 2017-12-01 13:48:59 +01:00
Michael Woerister
64e109327d incr.comp.: Add a newtype for byte positions within the incr. comp. cache. 2017-12-01 13:48:19 +01:00
Michael Woerister
45439945c9 incr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.
The previous method ran into problems because ICH would treat Spans
as (file,line,col) but the cache contained byte offsets and its
possible for the latter to change while the former stayed stable.
2017-12-01 13:48:19 +01:00
Michael Woerister
409e39285d incr.comp.: Properly hash and encode macro expansion information. 2017-12-01 13:48:19 +01:00
Nikolay Merinov
f2df1f5ec6 build_helper: destination file can't be up to date when not exists
Function "up_to_date" return incorrect result if mtime for all fetched
sources is set to epoch time. Add existence check to function.
2017-12-01 14:55:02 +05:00
bors
315fbf7518 Auto merge of #46211 - snipsco:master, r=pnkfelix
disable jemalloc on executables for ios targets

This is a (temporary ?) workaround for issue #45262
2017-12-01 08:44:42 +00:00
Julian Kulesh
f18446e78d add magic comment for ui test, remove newline 2017-12-01 11:38:30 +03:00
Sunjay Varma
9d5592b436 Updated generic-associated-types-where stderr 2017-12-01 01:26:29 -05:00
Sunjay Varma
f0ecdfb1ab Added case for when impl generic associated type has a where clause 2017-12-01 01:26:29 -05:00
Sunjay Varma
fdf6c652ce Moved all of the tests over to ui and annotated why they are failing with appropriate fixme comments 2017-12-01 01:26:29 -05:00
Sunjay Varma
db4408a3ce Removed FIXME on a line that actually works for some reason... 2017-12-01 01:26:29 -05:00
Sunjay Varma
cc52e412f8 Adding error line so that test passes 2017-12-01 01:26:29 -05:00
Sunjay Varma
3bac9ff386 added must-compile-successfully 2017-12-01 01:26:29 -05:00
Sunjay Varma
38c2a73017 Testing and fixes 2017-12-01 01:26:29 -05:00
Sunjay Varma
1c023b3cec Renaming MethodRibKind to TraitOrImplItemRibKind and removing its field which was never used. Lifting the HasTypeParameters rib to all trait item kinds and all impl item kinds 2017-12-01 01:26:29 -05:00
Sunjay Varma
e0621a1786 Adding type paramter ribs for generic associated types 2017-12-01 01:26:29 -05:00
Sunjay Varma
4a69ce99fa Preventing moving out of the trait item kind 2017-12-01 01:26:29 -05:00
Sunjay Varma
223d091744 Parsing where clauses correctly and documenting the grammar being parsed 2017-12-01 01:26:29 -05:00
Sunjay Varma
c2aaba9b44 Specifically gating generic_associated_types feature on associated Type declarations 2017-12-01 01:26:29 -05:00
Niko Matsakis
e565b5bbdd demonstrate how we can write "successful parse" tests quite easily 2017-12-01 01:26:29 -05:00
Sunjay Varma
1b196fa324 Added stderr files for ui tests 2017-12-01 01:26:29 -05:00
Sunjay Varma
332a3cb169 More testing for generic associated types parsing 2017-12-01 01:26:29 -05:00
Sunjay Varma
83efebc539 Fixed tidy errors 2017-12-01 01:26:29 -05:00
Sunjay Varma
f29613437f Adding feature gate 2017-12-01 01:26:29 -05:00
Sunjay Varma
6bd8ea1a6b Added run-pass tests for associated generic types 2017-12-01 01:24:53 -05:00
Sunjay Varma
19e25b61d1 Parsing generics in both trait items and impl items 2017-12-01 01:24:53 -05:00
bors
d1364a65c0 Auto merge of #45997 - estebank:pub-ident, r=nikomatsakis
Account for missing keyword in fn/struct definition

Fix #38911.
2017-12-01 06:06:06 +00:00
bors
804b15be82 Auto merge of #45846 - pietroalbini:use-nested-groups, r=petrochenkov
Add nested groups in imports

This PR adds support for nested groups in imports (rust-lang/rfcs#2128, tracking issue #44494).

r? @petrochenkov
2017-12-01 03:25:54 +00:00
bors
d8a60c9611 Auto merge of #46370 - michaelwoerister:rm-metadata-hashing, r=eddyb
incr.comp.: Remove ability to produce incr. comp. hashes during metadata export.

This functionality has been superseded by on-import hashing, which can be less conservative and does not require extra infrastructure.

r? @nikomatsakis
2017-12-01 00:46:08 +00:00
David Wood
c6b1ba56d7
Fixed spurious cannot borrow immutable item error with a closure. 2017-11-30 23:19:06 +00:00
David Wood
dedbb4edd1
Immutable unique closure upvars cannot be mutated. 2017-11-30 23:18:38 +00:00