about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2018-06-04Auto merge of #51334 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-1/+2
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-03Remove is_import fieldMark Simulacrum-1/+2
2018-06-03Show which line the link is coming from.kennytm-10/+61
2018-06-03Point to the rustdoc attribute where intralink resolution failed.kennytm-8/+17
2018-06-03Auto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-3/+6
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-02Rollup merge of #51297 - GuillaumeGomez:fix-run-but-style, r=QuietMisdreavusMark Simulacrum-3/+6
Fix run button style r? @QuietMisdreavus
2018-06-02Add attributes for trait and methods as wellGuillaume Gomez-13/+21
2018-06-02Fix run button styleGuillaume Gomez-3/+6
2018-06-01merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATESNiko Matsakis-1/+1
2018-05-30Fixes some style issues in rustdoc "implementations on Foreign types"Guillaume Gomez-8/+33
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-1/+1
2018-05-26Use `Ident`s for fields in HIRVadim Petrochenkov-8/+8
2018-05-24Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27kennytm-0/+7
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-23rustdoc: hide macro export statements from docsQuietMisdreavus-0/+7
2018-05-23Rollup merge of #50947 - QuietMisdreavus:nice-tabs, r=GuillaumeGomezkennytm-0/+2
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-23Rollup merge of #50875 - QuietMisdreavus:short-features, r=GuillaumeGomezkennytm-22/+30
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-22Auto merge of #50486 - Manishearth:approx-stab, r=nrcbors-1/+0
Stabilize suggestion applicability field in json output cc @killercup r? @nrc
2018-05-21rustdoc: set tab width in rust source blocksQuietMisdreavus-0/+2
2018-05-21Stabilize suggestion applicability field in json outputManish Goregaokar-1/+0
2018-05-21rustc: move TypeParamDef's fields into GenericParamDefKind::Type.Eduard-Mihai Burtescu-3/+3
2018-05-21Auto merge of #50924 - petrochenkov:spanover, r=alexcrichtonbors-2/+2
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-20lexer: Fix span override for the first token in a stringVadim Petrochenkov-2/+2
2018-05-19rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded ↵Eduard-Mihai Burtescu-5/+5
constants".
2018-05-18propagate "short form" into all Html printsQuietMisdreavus-22/+30
2018-05-18Auto merge of #50533 - GuillaumeGomez:rustdoc-prim-auto, r=QuietMisdreavusbors-16/+46
add auto-impl for primitive type Part of #50431. I have no clue how to test this though with the rustdoc test suite... r? @QuietMisdreavus
2018-05-17Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichtonbors-2/+0
Switch to bootstrapping from 1.27 It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17Switch to 1.26 bootstrap compilerMark Simulacrum-2/+0
2018-05-17Rename trans to codegen everywhere.Irina Popa-14/+14
2018-05-17Rollup merge of #50728 - sinkuu:fix_50702, r=GuillaumeGomezkennytm-6/+29
Fix rustdoc panic with `impl Trait` in type parameters Fixes #50702. I'm not sure `impl Trait`s neither in arguments nor in return types are supposed to work, though.
2018-05-16Rollup merge of #50669 - QuietMisdreavus:deprecated-attrs, r=GuillaumeGomezkennytm-2/+32
rustdoc: deprecate `#![doc(passes, plugins, no_default_passes)]` Closes https://github.com/rust-lang/rust/issues/48164 Blocked on https://github.com/rust-lang/rust/pull/50541 - this includes those changes, which were necessary to create the UI test cc https://github.com/rust-lang/rust/issues/44136 Turns out, there were special attributes to mess with rustdoc passes and plugins! Who knew! Since we deprecated the CLI flags for this functionality, it makes sense that we do the same for the attributes. This PR also introduces a `#![doc(document_private_items)]` attribute, to match the `--document-private-items` flag introduced in https://github.com/rust-lang/rust/pull/44138 when the passes/plugins flags were deprecated. I haven't done a search to see whether these attributes are being used at all, but if the flags were any indication, i don't expect to see any users of these.
2018-05-16Auto merge of #50473 - petrochenkov:pmapi, r=alexcrichtonbors-1/+1
Review proc macro API 1.2 cc https://github.com/rust-lang/rust/issues/38356 Summary of applied changes: - Documentation for proc macro API 1.2 is expanded. - Renamed APIs: `Term` -> `Ident`, `TokenTree::Term` -> `TokenTree::Ident`, `Op` -> `Punct`, `TokenTree::Op` -> `TokenTree::Punct`, `Op::op` -> `Punct::as_char`. - Removed APIs: `Ident::as_str`, use `Display` impl for `Ident` instead. - New APIs (not stabilized in 1.2): `Ident::new_raw` for creating a raw identifier (I'm not sure `new_x` it's a very idiomatic name though). - Runtime changes: - `Punct::new` now ensures that the input `char` is a valid punctuation character in Rust. - `Ident::new` ensures that the input `str` is a valid identifier in Rust. - Lifetimes in proc macros are now represented as two joint tokens - `Punct('\'', Spacing::Joint)` and `Ident("lifetime_name_without_quote")` similarly to multi-character operators. - Stabilized APIs: None yet. A bit of motivation for renaming (although it was already stated in the review comments): - With my compiler frontend glasses on `Ident` is the single most appropriate name for this thing, *especially* if we are doing input validation on construction. `TokenTree::Ident` effectively wraps `token::Ident` or `ast::Ident + is_raw`, its meaning is "identifier" and it's already named `ident` in declarative macros. - Regarding `Punct`, the motivation is that `Op` is actively misleading. The thing doesn't mean an operator, it's neither a subset of operators (there is non-operator punctuation in the language), nor superset (operators can be multicharacter while this thing is always a single character). So I named it `Punct` (first proposed in [the original RFC](https://github.com/rust-lang/rfcs/pull/1566), then [by @SimonSapin](https://github.com/rust-lang/rust/issues/38356#issuecomment-276676526)) , together with input validation it's now a subset of ASCII punctuation character category (`u8::is_ascii_punctuation`).
2018-05-16Fix rustdoc panic with `impl Trait` in type parametersShotaro Yamada-6/+29
2018-05-16Auto merge of #50541 - QuietMisdreavus:rustdoc-errors, r=GuillaumeGomezbors-122/+144
rustdoc: replace most (e)println! statements with structured warnings/errors Turns out, the rustc diagnostic handler doesn't need a whole lot of setup that we weren't already doing. For errors that occur outside a "dealing with source code" context, we can just use the format/color config we were already parsing and make up a `Handler` that we can emit structured warnings/errors from. So i did that. This will make it way easier to test things with `rustdoc-ui` tests, since those require the JSON error output. (In fact, this PR is a yak shave for a different one where i was trying to do just that. `>_>`)
2018-05-15Auto merge of #48523 - varkor:generics-ty-generalisations, r=nikomatsakisbors-83/+108
The Great Generics Generalisation: Ty Edition Part of the generic parameter refactoring effort, split off from https://github.com/rust-lang/rust/pull/48149. Contains the `ty`-relative refactoring. r? @eddyb
2018-05-15Represent lifetimes as two joint tokens in proc macrosVadim Petrochenkov-1/+1
2018-05-15add auto-impl for primitive typeGuillaume Gomez-16/+46
2018-05-15Refactoring generic counting loopsvarkor-1/+5
2018-05-15Lift pure_wrt_drop to GenericParamDefvarkor-2/+2
2018-05-15Refactor generic params loopsvarkor-1/+1
2018-05-15Pull common parameters into GenericParamDefvarkor-18/+18
This leads to a lot of simplifications, as most code doesn't actually need to know about the specific lifetime/type data; rather, it's concerned with properties like name, index and def_id.
2018-05-15Inline get_typevarkor-7/+9
2018-05-15Use GenericParamCount instead of FxHashMapvarkor-16/+19
2018-05-15Correct variable renaming falloutvarkor-2/+2
2018-05-15Eliminate ty::Generics::types()varkor-5/+9
And with one final incanation, the specific kind iterators were banished from ty::Generics, never to be seen again!
2018-05-15Eliminate ty::Generics::lifetimes()varkor-4/+9
Begone lazy lifetime code!
2018-05-15Generalise more cases of explicit iteration of specific kindsvarkor-2/+2
2018-05-15Generalise cases of explicit iteration of specific kindsvarkor-39/+50
2018-05-15Rename TypeParameterDef -> TypeParamDef and RegionParameterDef -> RegionParamDefvarkor-3/+3
2018-05-15Rename GenericParam to GenericParamDefvarkor-22/+22
2018-05-15Prefer iterator to vecvarkor-2/+1