3862 Commits

Author SHA1 Message Date
bors
0f8f4903f7 Auto merge of #51382 - GuillaumeGomez:intra-link-lint, r=QuietMisdreavus
Add lint for intra link resolution failure

This PR is almost done, just remains this note:

```
note: requested on the command line with `-W intra-link-resolution-failure`
```

I have no idea why my lint is considered as being passed through command line and wasn't able to find where it was set. If anyone has an idea, it'd be very helpful!

cc @QuietMisdreavus
2018-06-17 02:57:40 +00:00
bors
b2bbb5a9b7 Auto merge of #51584 - QuietMisdreavus:globs-and-crosses, r=ollie27
rustdoc: process cross-crate glob re-exports

Turns out, we were deliberately ignoring glob re-exports when they were occurring across crates, even though we were fully processing them for local re-exports. This will at least bring the two into parity.

Fixes https://github.com/rust-lang/rust/issues/51252
2018-06-16 17:43:24 +00:00
Guillaume Gomez
afeb790ea1 Fix macro missing from doc search 2018-06-16 14:14:18 +02:00
QuietMisdreavus
042f1df198 process cross-crate glob re-exports 2018-06-15 18:18:14 -05:00
Guillaume Gomez
e28502edca Fix search fn keyword 2018-06-15 23:23:25 +02:00
QuietMisdreavus
16cfa5c2ef rustdoc: discard struct ctors from imports 2018-06-14 17:47:35 -05:00
Guillaume Gomez
d2a4e42959 Rename intra-doc lint 2018-06-13 23:30:34 +02:00
Guillaume Gomez
e6c7868fb2 Update help message to escape square brackets 2018-06-13 21:18:56 +02:00
Guillaume Gomez
2e343f384f Add help for intra-link lint 2018-06-13 21:18:55 +02:00
Guillaume Gomez
8c43c93e6d Fix options issues 2018-06-13 21:18:55 +02:00
Guillaume Gomez
de974645e1 Greatly improve tables display in docs 2018-06-13 21:11:08 +02:00
kennytm
ca65a5e485
Don't auto-hide inherent impls even if rustdoc-collapse == true. 2018-06-13 18:00:18 +08:00
Guillaume Gomez
dadfa13f47 Fix extern prelude failure in rustdoc 2018-06-11 22:24:35 +02:00
Guillaume Gomez
b000cf0726 Add lint for intra link resolution failure 2018-06-09 14:07:25 +02:00
Mark Rousskov
32ed5acf98
Rollup merge of #51391 - estebank:docspan, r=GuillaumeGomez
Use spans pointing at the inside of a rustdoc attribute

Follow up to #51111.

Point to the link in a rustdoc attribute where intralink resolution failed, instead of the full rustdoc attribute's span.

r? @GuillaumeGomez cc @kennytm
2018-06-08 17:21:02 -06:00
Oliver Schneider
20f759fdce Fix rustdoc 2018-06-08 11:09:05 +02:00
Esteban Küber
31bb50b6b9 Use from_inner_byte_pos for cleaner code 2018-06-07 09:47:09 -07:00
Oliver Schneider
9b1bd94e37 Add existential type definitons 2018-06-07 17:33:53 +02:00
Esteban Küber
7d0b6b75f0 When unable to sinthesize link span, fallback to previous behavior 2018-06-06 09:38:47 -07:00
Esteban Küber
507dfd2148 Use spans pointing at the inside of a rustdoc attribute 2018-06-06 08:49:42 -07:00
Oliver Middleton
e73941a06b rustdoc: Fix missing stability and src links for inlined external macros 2018-06-06 04:13:55 +01:00
Mark Simulacrum
ac32f8151b
Rollup merge of #51256 - GuillaumeGomez:fix-rustdoc-crate-name, r=QuietMisdreavus
Fix crate-name option in rustdoc

Fixes #51229.

r? @QuietMisdreavus
2018-06-05 08:33:47 -06:00
Guillaume Gomez
3cbcc5a22d Fix crate-name option in rustdoc 2018-06-04 23:05:14 +02:00
Guillaume Gomez
f784d5ead2 Remove useless function call for keyword generation in rustdoc 2018-06-04 09:51:41 +02:00
Guillaume Gomez
904f4921f8 Few improvements 2018-06-04 09:51:41 +02:00
Guillaume Gomez
ebee483e24 Add doc keyword support 2018-06-04 09:51:41 +02:00
bors
6232478d26 Auto merge of #51334 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 6 pull requests

Successful merges:

 - #51288 (Remove rustdoc-specific is_import field from HIR)
 - #51299 (const fn integer operations)
 - #51317 (Allow enabling incremental via config.toml)
 - #51323 (Generate br for all two target SwitchInts)
 - #51326 (Various minor slice iterator cleanups)
 - #51329 (Remove the unused `-Z trans-time-graph` flag.)

Failed merges:
2018-06-04 02:05:00 +00:00
Mark Simulacrum
19e0b7da1c Remove is_import field 2018-06-03 11:29:44 -06:00
kennytm
2886aca232
Show which line the link is coming from. 2018-06-03 18:25:04 +08:00
kennytm
bc20eb6fbc
Point to the rustdoc attribute where intralink resolution failed. 2018-06-03 15:51:31 +08:00
bors
3575be60ea Auto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 6 pull requests

Successful merges:

 - #51143 (Specify that packed types must derive, not implement, Copy)
 - #51226 (Make Layout's align a NonZeroUsize)
 - #51297 (Fix run button style)
 - #51306 (impl Default for &mut str)
 - #51312 (Clarify the difference between get_mut and into_mut for OccupiedEntry)
 - #51313 (use type name in E0599 enum variant suggestion)

Failed merges:
2018-06-03 03:13:43 +00:00
Mark Simulacrum
0c695e01da
Rollup merge of #51297 - GuillaumeGomez:fix-run-but-style, r=QuietMisdreavus
Fix run button style

r? @QuietMisdreavus
2018-06-02 19:55:07 -06:00
Guillaume Gomez
26ad95c9d4 Add attributes for trait and methods as well 2018-06-02 23:26:46 +02:00
Guillaume Gomez
7585632052 Fix run button style 2018-06-02 13:47:42 +02:00
Niko Matsakis
8b39808ffe merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATES 2018-06-01 11:00:18 -04:00
Guillaume Gomez
c7312fbae4 Fixes some style issues in rustdoc "implementations on Foreign types" 2018-05-30 01:12:23 +02:00
Vadim Petrochenkov
1e4269cb83 Add Ident::as_str helper 2018-05-26 15:20:23 +03:00
Vadim Petrochenkov
189c0a1297 Use Idents for fields in HIR 2018-05-26 14:41:58 +03:00
kennytm
98606cfe12
Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27
rustdoc: hide macro export statements from docs

As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta.

What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
2018-05-24 17:34:55 +08:00
QuietMisdreavus
e3d9f19219 rustdoc: hide macro export statements from docs 2018-05-23 16:22:18 -05:00
kennytm
c717a70a36
Rollup merge of #50947 - QuietMisdreavus:nice-tabs, r=GuillaumeGomez
rustdoc: set tab width in rust source blocks

cc https://github.com/rust-lang/rust/issues/49155 (fixes it?)

This sets the tab width ([in supported browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size)) in Rust source blocks to 4 spaces wide (instead of the default 8), to correspond with the style guidelines.
2018-05-23 00:26:19 +08:00
kennytm
42b4c49b45
Rollup merge of #50875 - QuietMisdreavus:short-features, r=GuillaumeGomez
rustdoc: use "short form" doc(cfg) printing even when combined with other conditionals

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

The original "short form" printing was introduced when `target_feature` was added to the `doc(cfg)` handling. However, it didn't properly propagate the "short form" indicator if the cfg was a combination of multiple conditionals, so the linked issue happened. This changes the handling to use a bool in the original `Html` wrapper, rather than a separate wrapper struct that defers to the original one.
2018-05-23 00:26:11 +08:00
bors
38fd7ea50a Auto merge of #50486 - Manishearth:approx-stab, r=nrc
Stabilize suggestion applicability field in json output

cc @killercup

r? @nrc
2018-05-22 01:53:55 +00:00
QuietMisdreavus
ac383454c3 rustdoc: set tab width in rust source blocks 2018-05-21 16:46:38 -05:00
Manish Goregaokar
30bd586bec Stabilize suggestion applicability field in json output 2018-05-21 10:48:12 -07:00
Eduard-Mihai Burtescu
73f62106ad rustc: move TypeParamDef's fields into GenericParamDefKind::Type. 2018-05-21 12:13:19 +03:00
bors
ba1363ffe1 Auto merge of #50924 - petrochenkov:spanover, r=alexcrichton
lexer: Fix span override for the first token in a string

Previously due to peculiarities of `StringReader` construction something like `"a b c d".parse::<TokenStream>()` gave you one non-overridden span for `a` and then three correctly overridden spans for `b`, `c` and `d`.
Now all the spans are overridden.
2018-05-21 03:36:30 +00:00
Vadim Petrochenkov
b4714cdf6e lexer: Fix span override for the first token in a string 2018-05-20 23:35:00 +03:00
Eduard-Mihai Burtescu
26aad25487 rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants". 2018-05-19 20:34:42 +03:00
QuietMisdreavus
d8265621d8 propagate "short form" into all Html prints 2018-05-18 14:55:11 -05:00