Commit Graph

81807 Commits

Author SHA1 Message Date
QuietMisdreavus
323b2b71ec only abort after all early passes have run 2018-08-04 22:20:45 -05:00
QuietMisdreavus
bef0f2576d don't process intra-links on extern-crate items 2018-08-04 22:20:45 -05:00
QuietMisdreavus
001445b235 add tests for new intra-doc-link behavior 2018-08-04 22:20:45 -05:00
QuietMisdreavus
9e4e266877 turn intra-doc-link collection into an early pass 2018-08-04 22:20:45 -05:00
bors
ddcf17e1ed Auto merge of #53078 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update cargo to fix Rust 2018 build scripts
2018-08-05 03:20:13 +00:00
Alex Crichton
f7df580de8 Update cargo to fix Rust 2018 build scripts 2018-08-04 17:40:46 -07:00
Alex Crichton
b0337a81bd Update LLVM submodule to 7.0
This commit updates the following submodules to LLVM's [recently branched][1]
7.0 release branch:

* src/llvm
* src/tools/lld
* src/libcompiler_builtins/compiler-rt

[1]: https://lists.llvm.org/pipermail/llvm-dev/2018-August/125004.html

Closes #52970
2018-08-04 17:30:14 -07:00
QuietMisdreavus
d3d6f76887 introduce "early passes" an convert a few over 2018-08-04 18:49:57 -05:00
QuietMisdreavus
aaec1014d8 strongly-typed passes 2018-08-04 18:44:05 -05:00
bors
dbcb33f23b Auto merge of #53057 - nrc:update, r=kennytm
Update rustfmt, RLS, Clippy

r? @kennytm

Fixes RLS build and updates RLS and Rustfmt to their 1.0 RCs
2018-08-04 23:21:01 +00:00
Nick Cameron
9a769c66e9 Update rustfmt and RLS 2018-08-05 10:07:19 +12:00
bors
667fdc1ce4 Auto merge of #52827 - GuillaumeGomez:generic-impls, r=QuietMisdreavus
rustdoc: clean up generic impls

r? @QuietMisdreavus
2018-08-04 21:20:26 +00:00
bors
94c3c340cc Auto merge of #52758 - Mark-Simulacrum:session-cleanup, r=pnkfelix
Cleanup for librustc::session

Some rather straightforward cleanup. Each commit mostly stands alone.
2018-08-04 18:22:39 +00:00
bors
215bf3abd9 Auto merge of #53056 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

Successful merges:

 - #51919 (Provide `{to,from}_{ne,le,be}_bytes` functions on integers)
 - #52940 (Align 6-week cycle check with beta promotion instead of stable release.)
 - #52968 (App-lint-cability)
 - #52969 (rustbuild: fix local_rebuild)
 - #52995 (Remove unnecessary local in await! generator)
 - #52996 (RELEASES.md: fix the `hash_map::Entry::or_default` link)
 - #53001 (privacy: Fix an ICE in `path_is_private_type`)
 - #53003 (Stabilize --color and --error-format options in rustdoc)
 - #53022 (volatile operations docs: clarify that this does not help wrt. concurrency)
 - #53024 (Specify reentrancy gurantees of `Once::call_once`)
 - #53041 (Fix invalid code css rule)
 - #53047 (Make entire row of doc search results clickable)
 - #53050 (Make left column of rustdoc search results narrower)
 - #53062 (Remove redundant field names in structs)
2018-08-04 16:12:39 +00:00
kennytm
396dda0a6a
Rollup merge of #53062 - ljedrz:redundant_field_names, r=Mark-Simulacrum
Remove redundant field names in structs
2018-08-04 23:09:12 +08:00
ljedrz
d46dca66c9 Remove redundant field names in structs 2018-08-04 14:58:20 +02:00
Mark Rousskov
0ae2aa2320 Use diagnostic API on Session 2018-08-04 06:54:36 -06:00
Mark Rousskov
a9093a4dd8 Move share_generics getter onto options directly 2018-08-04 06:54:36 -06:00
Mark Rousskov
5fcef251d3 Move basic_options to impl of Default 2018-08-04 06:54:36 -06:00
Mark Rousskov
3cc4450a8a Simplify some handling of target_pointer_width 2018-08-04 06:54:36 -06:00
Mark Rousskov
2bc71971e5 Normalize DebugInfoLevel to standard style 2018-08-04 06:54:34 -06:00
Mark Rousskov
442a4744e3 Normalize EntryFnType variants to standard style 2018-08-04 06:54:12 -06:00
Mark Rousskov
b3267dcb31 Normalize variants of Passes to standard style 2018-08-04 06:53:15 -06:00
Mark Rousskov
2a9344206b Normalize variants of CrateType to standard style
This is a clippy-breaking change.
2018-08-04 06:53:15 -06:00
Mark Rousskov
e59e02ef46 Privatize some exports from code_stats 2018-08-04 06:53:15 -06:00
Vadim Petrochenkov
79289b9545 cleanup: Remove Def::GlobalAsm 2018-08-04 14:31:30 +03:00
Guillaume Gomez
d57f3a61c4 Update to master 2018-08-04 11:40:56 +02:00
kennytm
b643351c08
Rollup merge of #53050 - carols10cents:rustdoc-moar-room, r=GuillaumeGomez
Make left column of rustdoc search results narrower

To make more room for the description of the item

The description often has useful text that helps disambiguate between search results, but very little of it is shown.

As a side effect, this breaks the alignment between the search results and the "In Return Types" tab, which tends to line up above the description-- up until I started investigating this, I thought "In Names"/"In Parameters"/"In Return Types" were column headers and I just never saw search results that had info for the "In Parameters" middle column! Now, with the two columns of search results each taking up about a half, they look more like tabs than column headers.

Types that are long still wrap and look good-- I made some artificially long types in the following screenshots.

Before screenshot:

<img width="1258" alt="screen shot 2018-08-03 at 8 32 35 pm" src="https://user-images.githubusercontent.com/193874/43670805-56e3b3b4-975e-11e8-9296-600837d03de2.png">

After screenshot:

<img width="1239" alt="screen shot 2018-08-03 at 8 31 17 pm" src="https://user-images.githubusercontent.com/193874/43670810-6591f9ac-975e-11e8-9e12-4ea9ab1e5806.png">
2018-08-04 17:20:10 +08:00
kennytm
52db0ed161
Rollup merge of #51919 - tbu-:pr_num_to_from_bytes2, r=SimonSapin
Provide `{to,from}_{ne,le,be}_bytes` functions on integers

If one doesn't view integers as containers of bytes, converting them to
bytes necessarily needs the specfication of encoding.

I think Rust is a language that wants to be explicit. The `to_bytes`
function is basically the opposite of that – it converts an integer into
the native byte representation, but there's no mention (in the function
name) of it being very much platform dependent. Therefore, I think it
would be better to replace that method by three methods, the explicit
`to_ne_bytes` ("native endian") which does the same thing and
`to_{le,be}_bytes` which return the little- resp. big-endian encoding.
2018-08-04 17:19:38 +08:00
Guillaume Gomez
0bff861d32 Remove FinderTrait and move its functions into DocContext 2018-08-04 11:02:25 +02:00
Guillaume Gomez
fc81adb3c2 Improve functions naming 2018-08-04 11:02:00 +02:00
Guillaume Gomez
2758de4b95 Fix dyn objects 2018-08-04 11:02:00 +02:00
Guillaume Gomez
e0f8f871f6 Strengthen tests 2018-08-04 11:02:00 +02:00
Guillaume Gomez
8301081c90 Fix primitive blanket impls not showing up 2018-08-04 11:02:00 +02:00
Guillaume Gomez
4aba7de2a7 Clean generic impls code 2018-08-04 11:02:00 +02:00
Scott McMurray
1c7af279aa Remove in-band lifetimes from the 2018 edition
As mentioned in the 2018-08-04 edition status update, these are postponed as lacking consensus to stabilize.
2018-08-04 00:36:46 -07:00
Niko Matsakis
5e2f337e6b more comments and justify correctness 2018-08-04 09:30:24 +02:00
Niko Matsakis
936fa6f67f generalize the Deref case and simplify the code 2018-08-04 09:26:30 +02:00
Niko Matsakis
e7d8d651d5 add a comment explaining the idea 2018-08-04 09:26:20 +02:00
Tobias Bucher
0ddfae5ba2 Change tracking issue from #49792 to #51919
The old issue has already been in FCP, a new issue was opened for the
new API.
2018-08-04 08:36:54 +02:00
kennytm
aefa307c1f
Rollup merge of #53047 - integer32llc:rustdoc-clicky-clicky, r=QuietMisdreavus
Make entire row of doc search results clickable

By adding empty `after` content that clears and is `display: block`.
Technique found here: https://stackoverflow.com/a/7817313/51683

Now any part of a documentation search result that is highlighted when
you hover over it should also be clickable.

NOTE: THE BELOW IMAGES ARE GIFS BUT I DIDN'T MAKE THEM LOOP, OPEN IN A NEW TAB TO SEE THEM SORRY SORRY

Here's what happens before this change: my mouse cursor is in the middle of the table cell, and the row is highlighted which makes it look like clicking should have an effect, but clicking doesn't do anything:

![rustdoc-clicky-clicky-before](https://user-images.githubusercontent.com/193874/43668604-d1e63392-974b-11e8-99f5-e7e11c9056e8.gif)

After this change, clicking in the middle of the cell works!

![rustdoc-clicky-clicky-after](https://user-images.githubusercontent.com/193874/43668616-e522fa08-974b-11e8-8409-3826d586d1f7.gif)

It even works nicely when the type is really long and wraps! (I created the type artificially because I couldn't find a long enough one in the wild)

![rustdoc-clicky-clicky-after-long](https://user-images.githubusercontent.com/193874/43668639-f962a75c-974b-11e8-9218-70bf068387a3.gif)
2018-08-04 14:36:02 +08:00
kennytm
e8060a4229
Rollup merge of #53041 - GuillaumeGomez:fix-code-css-rule, r=QuietMisdreavus
Fix invalid code css rule

Fixes #53017.

r? @QuietMisdreavus
2018-08-04 14:36:00 +08:00
kennytm
43410981ae
Rollup merge of #53024 - matklad:patch-1, r=alexcrichton
Specify reentrancy gurantees of `Once::call_once`

I don't think the docs are clear about what happens in the following code

```rust
static INIT: Once = ONCE_INIT;

INIT.call_once(|| INIT.call_once(|| println!("huh?")));
```

[Playground](https://play.rust-lang.org/?gist=15dde1f68a6ede263c7250c36977eade&version=stable&mode=debug&edition=2015)

Let's "specify" the behavior to make it clear that the current behavior (deadlock I think?) is not a strict guarantee.
2018-08-04 14:35:59 +08:00
kennytm
aeb2028481
Rollup merge of #53022 - RalfJung:volatile, r=alexcrichton
volatile operations docs: clarify that this does not help wrt. concurrency

Triggered by https://github.com/rust-lang/rust/pull/52391. Cc @stjepang @Amanieu

Should the intrinsics themselves also get more documentation? They generally do not seem to have much of that.
2018-08-04 14:35:58 +08:00
kennytm
7a23b5dec3
Rollup merge of #53003 - GuillaumeGomez:stabilize-rustdoc-options, r=QuietMisdreavus
Stabilize --color and --error-format options in rustdoc

Fixes #52980

cc @kennytm

r? @QuietMisdreavus
2018-08-04 14:35:56 +08:00
kennytm
d028b3ea33
Rollup merge of #53001 - petrochenkov:master, r=estebank
privacy: Fix an ICE in `path_is_private_type`

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

(Untested.)
2018-08-04 14:35:55 +08:00
kennytm
035db4b004
Rollup merge of #52996 - cuviper:1.28-or_default, r=Mark-Simulacrum
RELEASES.md: fix the `hash_map::Entry::or_default` link

None
2018-08-04 14:35:54 +08:00
kennytm
59bfa8a884
Rollup merge of #52995 - cramertj:smaller-await, r=withoutboats
Remove unnecessary local in await! generator

This makes `async { await!(future::ready(())) }` 4 bytes instead of 16. [Playground example](http://play.rust-lang.org/?gist=54c075599b9ff390fe505c75d6b98feb&version=nightly&mode=debug&edition=2018)
2018-08-04 14:35:53 +08:00
kennytm
a365382826
Rollup merge of #52969 - Keruspe:local_rebuild, r=alexcrichton
rustbuild: fix local_rebuild

If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1.
When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1.
Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild

This fixes building current master using current beta (as master hasn't yet been bumped to 1.30).
This should be backported to beta too, as currently we cannot build beta using itself because of that.

r? @alexcrichton
2018-08-04 14:35:51 +08:00
kennytm
e82dab7c0e
Rollup merge of #52968 - zackmdavis:app-lint-cability, r=estebank
App-lint-cability

@eminence recently pointed out (rust-lang/cargo#5846) that it's
surprising that `cargo fix` (now shipping with Cargo itself!) doesn't
fix very common lint warnings, which is as good of a reminder as any
that we should finish #50723.

(Previously, we did this on the librustc and libsyntax crates in #50724. I filed cmr/this-week-in-rust#685 in hopes of recruiting new contributors to do the rest.)

r? @estebank
2018-08-04 14:35:50 +08:00