summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2017-01-31Auto merge of #39354 - alexcrichton:less-output, r=steveklabnikbors-0/+4
rustdoc: Suppress warnings/errors with --test Threads spawned by the test framework have their output captured by default, so for `rustdoc --test` threads this propagates that capturing to the spawned thread that we now have. Closes #39327
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-31/+0
2017-01-28Auto merge of #39340 - GuillaumeGomez:empty_comment, r=frewsxcvbors-1/+2
Don't generate doc if doc comments only filled with 'white' characters Fixes #39339. r? @steveklabnik cc @rust-lang/docs
2017-01-28rustc: remove unused `bounds` field from `RegionParameterDef`.Eduard-Mihai Burtescu-7/+2
2017-01-28rustc: always keep an explicit lifetime in trait objects.Eduard-Mihai Burtescu-14/+14
2017-01-28rustc: clean up the style of middle::resolve_lifetime.Eduard-Mihai Burtescu-4/+4
2017-01-28rustc: always include elidable lifetimes in HIR types.Eduard-Mihai Burtescu-5/+17
2017-01-27rustdoc: Suppress warnings/errors with --testAlex Crichton-0/+4
Threads spawned by the test framework have their output captured by default, so for `rustdoc --test` threads this propagates that capturing to the spawned thread that we now have. Closes #39327
2017-01-27Don't generate doc if doc comments only filled with 'white' charactersGuillaume Gomez-1/+2
2017-01-27Auto merge of #39158 - petrochenkov:bounds, r=nikomatsakisbors-2/+5
Bounds parsing refactoring 2 See https://github.com/rust-lang/rust/pull/37511 for previous discussion. cc @matklad Relaxed parsing rules: - zero bounds after `:` are allowed in all contexts. - zero predicates are allowed after `where`. - trailing separator `,` is allowed after predicates in `where` clauses not followed by `{`. Other parsing rules: - trailing separator `+` is still allowed in all bound lists. Code is also cleaned up and tests added. I haven't touched parsing of trait object types yet, I'll do it later.
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-52/+52
2017-01-24Refactor parsing of generic arguments/parameters and where clausesVadim Petrochenkov-2/+5
2017-01-21Force backline on all where in docsGuillaume Gomez-4/+3
2017-01-20Rollup merge of #39142 - nikomatsakis:issue-38973, r=brsonAlex Crichton-14/+21
run rustdoc tests in the same sort of thread rustc runs in Not sure yet if this is the problem in #38973 but seems like an improvement regardless. r? @brson
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-9/+7
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-19Auto merge of #39136 - keeperofdakeys:proc-macro-doc-test, r=alexcrichtonbors-0/+1
Stop warning when doc testing proc macro crates Fixes #39064 Add the test option to the session struct that is passed to phase_2_configure_and_expand function inside the rustdoc test module. This prevents the warning code from triggering when parsing proc_macro_derive attributes, just like when `--test` is normally invoked. This change makes the warning disappear, but I'm not sure what else it might change. So this early PR is mainly to run the test suite, and to get feedback.
2017-01-19Stop warning when doc testing proc macro cratesJosh-0/+1
Add the actually_rustdoc option to the session that is passed to phase_2_configure_and_expand function inside the rustdoc test module. This prevents the warning code from triggering when parsing proc_macro_derive attributes, just like when `--test` is normally invoked.
2017-01-17run rustdoc tests in the same sort of thread rustc runs inNiko Matsakis-14/+21
2017-01-17Fix fallout in `rustdoc`.Jeffrey Seyfried-9/+7
2017-01-17Rename ObjectSum into TraitObject in AST/HIRVadim Petrochenkov-1/+1
2017-01-17AST/HIR: Merge ObjectSum and PolyTraitRefVadim Petrochenkov-28/+14
2017-01-16Auto merge of #39076 - ollie27:rustdoc_stab_prim, r=GuillaumeGomezbors-2/+2
rustdoc: Give primitive types stability attributes This is especially important for i128/u128 to make it clear they are unstable in the docs.
2017-01-15Fix missing blank space issueGuillaume Gomez-2/+4
2017-01-15rustdoc: Give primitive types stability attributesOliver Middleton-2/+2
This is especially important for i128/u128 to make it clear they are unstable in the docs.
2017-01-12Auto merge of #38569 - chris-morgan:rustdoc-highlight-kw-2, r=steveklabnikbors-3/+5
Fix rustdoc highlighting of `&` and `*` Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2 (RefKeyword). The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
2017-01-09Improved rustdoc rendering for unstable featuresManish Goregaokar-11/+26
2017-01-09Auto merge of #38244 - estebank:escape-reason-docs, r=ollie27bors-9/+36
rustdoc: escape the deprecated and unstable reason text Fix #38220. Instead of the [current output](https://doc.rust-lang.org/std/boxed/trait.FnBox.html): <img width="967" alt="incorrect unescaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021898/73121d42-bd2f-11e6-8076-8a5127dbc010.png"> display: <img width="979" alt="escaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021876/52eb0f88-bd2f-11e6-9088-58bdc7d92328.png">
2017-01-08Auto merge of #38813 - eddyb:lazy-11, r=nikomatsakisbors-18/+4
[11/n] Separate ty::Tables into one per each body. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38449) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> In order to track the results of type-checking and inference for incremental recompilation, they must be stored separately for each function or constant value, instead of lumped together. These side-`Tables` also have to be tracked by various passes, as they visit through bodies (all of which have `Tables`, even if closures share the ones from their parent functions). This is usually done by switching a `tables` field in an override of `visit_nested_body` before recursing through `visit_body`, to the relevant one and then restoring it - however, in many cases the nesting is unnecessary and creating the visitor for each body in the crate and then visiting that body, would be a much cleaner solution. To simplify handling of inlined HIR & its side-tables, their `NodeId` remapping and entries HIR map were fully stripped out, which means that `NodeId`s from inlined HIR must not be used where a local `NodeId` is expected. It might be possible to make the nodes (`Expr`, `Block`, `Pat`, etc.) that only show up within a `Body` have IDs that are scoped to that `Body`, which would also allow `Tables` to use `Vec`s. That last part also fixes #38790 which was accidentally introduced in a previous refactor.
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-18/+4
2017-01-04Auto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnikbors-168/+203
Rustdoc: disambiguate Implementors when the type name is not unique Presentation [goes from](https://doc.rust-lang.org/stable/std/iter/trait.ExactSizeIterator.html#implementors): <img width="492" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276752/b2b50474-c387-11e6-96e1-9766851da269.png"> to: <img width="787" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276763/bb37f6b0-c387-11e6-8596-9163cb254674.png"> on cases where there're multiple implementors with the same name. Fixes #37762.
2017-01-02Avoid rustdoc ICE when an unstable feature is usedSeo Sanghyeon-3/+9
2017-01-01Auto merge of #38653 - Mark-Simulacrum:dropless-arena, r=eddybbors-2/+5
Add a DroplessArena and utilize it as a more efficient arena when possible I will collect performance (probably just `-Ztime-passes`, and more if that shows significant differences, perhaps). 6feba98 also fixes a potential infinite loop if inplace reallocation failed for `TypedArena` (and `DroplessArena` via copied code). r? @eddyb
2016-12-31Split CtxtArenas into GlobalArenas and CtxtInterners.Mark Simulacrum-2/+5
CtxtInterners contains a single DroplessArena, while GlobalArenas contains the TypedArenas still required for the remaining Drop-containing types.
2016-12-30Make rustdoc aware of the primitive i128 typeest31-0/+4
Many thanks to ollie27 for spotting all the places.
2016-12-30Compilation fixesest31-1/+1
2016-12-30Add a way to retrieve constant value in 128 bitsSimonas Kazlauskas-1/+3
Fixes rebase fallout, makes code correct in presence of 128-bit constants. This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-40/+46
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which understands and supports 128-bit integers throughout. The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported, this strategy is good enough to get past the first bootstrap stages to end up with a fully working 128-bit capable compiler. In order for this strategy to work, number of locations had to be changed to use associated max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?) had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works (former not necessarily producing the right results in stage1). This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Rollup merge of #38671 - ollie27:rustdoc_stab_em_div_fix, r=frewsxcvAlex Crichton-2/+1
rustdoc: Fix broken CSS for trait items The `stab` class shouldn't have any effect here so can be removed as currently it adds an outline. This was accidentally caused by #38329. [before](https://doc.rust-lang.org/nightly/std/iter/trait.ExactSizeIterator.html) [after](https://ollie27.github.io/rust_doc_test/std/iter/trait.ExactSizeIterator.html)
2016-12-29rustdoc: Fix broken CSS for trait itemsOliver Middleton-2/+1
2016-12-28Auto merge of #38449 - eddyb:lazy-10, r=nikomatsakisbors-103/+136
[10/n] Split constants and functions' arguments into disjoint bodies. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38053) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> Finishes the signature-body split started in #37918, namely: * `trait` items are separated just like `impl` items were, for uniformity, closing #37712 * `static`s, `const`s (including associated ones), `enum` discriminants and array lengths get bodies * even the count in "repeat expressions", i.e. `n` in `[x; n]`, which fixes #24414 * arguments' patterns are moved to the bodies, with the types staying in `FnDecl` * `&self` now desugars to `self: &Self` instead of `self: &_` (similarly for other `self` forms) * `astconv`'s and metadata's (for rustdoc) informative uses are explicitly ignored for the purposes of the dep graph. this could be fixed in the future by hashing the exact information being extracted about the arguments as opposed to generating a dependency on *the whole body*
2016-12-28rustdoc: pretty-print nested bodies in inlined constants.Eduard-Mihai Burtescu-4/+27
2016-12-28rustc: always print nested nodes where a HIR map is available.Eduard-Mihai Burtescu-8/+6
2016-12-28rustc: simplify constant cross-crate loading and rustc_passes::consts.Eduard-Mihai Burtescu-12/+4
2016-12-28rustc: move function arguments into hir::Body.Eduard-Mihai Burtescu-64/+66
2016-12-28rustc: separate bodies for static/(associated)const and embedded constants.Eduard-Mihai Burtescu-9/+14
2016-12-28rustc: separate TraitItem from their parent Item, just like ImplItem.Eduard-Mihai Burtescu-6/+9
2016-12-28hir: lower `ImplicitSelf` to resolved `Self` TyQPath's.Eduard-Mihai Burtescu-11/+21
2016-12-28Auto merge of #38589 - aidanhs:aphs-stage0-rustdoc-test, r=alexcrichtonbors-13/+21
Teach `rustdoc --test` about `--sysroot`, pass it when testing rust This permits rustdoc tests to work in stage0. Logical continuation of #36586. Snippet from https://github.com/rust-lang/rust/issues/38575#issuecomment-269090724: > it should actually be possible to run all the libstd tests immediately after creating std of stage0-out - there's no reason to build librustc at all if you've just made a change to (for example) libcollections, `./x.py test src/libcollections --stage 0 -v --incremental` should just work This PR makes it so (or appears to in my testing). r? @alexcrichton