about summary refs log tree commit diff
path: root/src/test/rustdoc/inline_cross
AgeCommit message (Collapse)AuthorLines
2021-07-25Rustdoc accessibility: use real headers for doc itemsbors-33/+33
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-06-28Add test for item-table with resize to mobileStefan Schindler-2/+4
2021-06-24Migrate from custom elements to divs with classes to be compatible with safariStefan Schindler-2/+2
2021-06-02Update rustdoc testsGuillaume Gomez-8/+8
2021-05-30Remove toggle for "undocumented items."Jacob Hoffman-Andrews-8/+4
Per discussion in #84326. For trait implementations, this was misleading: the items actually do have documentation (but it comes from the trait definition). For both trait implementations and trait implementors, this was redundant: in both of those cases, the items are default-hidden by different toggle at the level above. Update tests: Remove XPath selectors that over-specified on details tag, in cases that weren't testing toggles. Add an explicit test for toggles on methods. Rename item-hide-threshold to toggle-item-contents for consistency.
2021-05-02Update testsGuillaume Gomez-4/+8
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-1/+0
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2021-03-13Avoid sorting predicates by `DefId`Aaron Hill-1/+1
Fixes issue #82920 Even if an item does not change between compilation sessions, it may end up with a different `DefId`, since inserting/deleting an item affects the `DefId`s of all subsequent items. Therefore, we use a `DefPathHash` in the incremental compilation system, which is stable in the face of changes to unrelated items. In particular, the query system will consider the inputs to a query to be unchanged if any `DefId`s in the inputs have their `DefPathHash`es unchanged. Queries are pure functions, so the query result should be unchanged if the query inputs are unchanged. Unfortunately, it's possible to inadvertantly make a query result incorrectly change across compilations, by relying on the specific value of a `DefId`. Specifically, if the query result is a slice that gets sorted by `DefId`, the precise order will depend on how the `DefId`s got assigned in a particular compilation session. If some definitions end up with different `DefId`s (but the same `DefPathHash`es) in a subsequent compilation session, we will end up re-computing a *different* value for the query, even though the query system expects the result to unchanged due to the unchanged inputs. It turns out that we have been sorting the predicates computed during `astconv` by their `DefId`. These predicates make their way into the `super_predicates_that_define_assoc_type`, which ends up getting used to compute the vtables of trait objects. This, re-ordering these predicates between compilation sessions can lead to undefined behavior at runtime - the query system will re-use code built with a *differently ordered* vtable, resulting in the wrong method being invoked at runtime. This PR avoids sorting by `DefId` in `astconv`, fixing the miscompilation. However, it's possible that other instances of this issue exist - they could also be easily introduced in the future. To fully fix this issue, we should 1. Turn on `-Z incremental-verify-ich` by default. This will cause the compiler to ICE whenver an 'unchanged' query result changes between compilation sessions, instead of causing a miscompilation. 2. Remove the `Ord` impls for `CrateNum` and `DefId`. This will make it difficult to introduce ICEs in the first place.
2021-02-07Enable smart punctuationCamelid-1/+1
2020-11-18Add support for custom allocators in `Vec`Tim Diekmann-2/+3
2020-07-02Update rustdoc testsGuillaume Gomez-2/+2
2020-02-15Record proc macro harness order for use during metadata deserializationAaron Hill-0/+21
Fixes #68690 When we generate the proc macro harness, we now explicitly recorder the order in which we generate entries. We then use this ordering data to deserialize the correct proc-macro-data from the crate metadata.
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-1/+1
2019-11-07Add more --extern tests.Eric Huss-1/+1
2019-09-25Rollup merge of #64599 - csmoe:doc_async_reexport, r=nikomatsakisMazdak Farrokhzad-1/+19
Rustdoc render async function re-export Closes #63710 r? @nikomatsakis
2019-09-21add rustdoc test for async fn reexportcsmoe-1/+19
2019-09-17Generate proc macro harness in AST order.Aaron Hill-1/+12
This ensures that we match the order used by proc macro metadata serialization. Fixes #64251
2019-08-29Rollup merge of #62734 - GuillaumeGomez:hide-default-methods, r=Mark-SimulacrumMazdak Farrokhzad-4/+4
Hide trait default methods Fixes #62499. However, the question remains: do we want to extend it to this point or not? r? @QuietMisdreavus
2019-08-29Auto merge of #62855 - Aaron1011:feature/rustdoc-reexport-final, r=petrochenkovbors-9/+17
Improve Rustdoc's handling of procedural macros Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-9/+17
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-19Fix ICE with `impl Trait` in type boundsShotaro Yamada-0/+8
2019-08-19Fix tidyShotaro Yamada-2/+6
2019-08-19Support nested `impl Trait`Shotaro Yamada-0/+8
2019-08-19Associated type bound for inlined impl Trait docShotaro Yamada-0/+10
2019-08-19Support `impl Trait` in inlined documentationShotaro Yamada-0/+20
2019-07-27Use doc comments from 'pub use' statementsAaron Hill-0/+13
Split off from #62855 Currently, rustdoc ignores any doc comments found on 'pub use' statements. As described in issue #58700, this makes it impossible to properly document procedural macros. Any doc comments must be written on the procedural macro definition, which must occur in a dedicated proc-macro crate. This means that any doc comments or doc tests cannot reference items defined in re-exporting crate, despite the fact that such items may be required to use the procedural macro. To solve this issue, this commit allows doc comments to be written on 'pub use' statements. For consistency, this applies to *all* 'pub use' statements, not just those importing procedural macros. When inlining documentation, documentation on 'pub use' statements will be prepended to the documentation of the inlined item. For example, the following items: ```rust mod other_mod { /// Doc comment from definition pub struct MyStruct; } /// Doc comment from 'pub use' /// pub use other_mod::MyStruct; ``` will caues the documentation for the re-export of 'MyStruct' to be rendered as: ``` Doc comment from 'pub use' Doc comment from definition ``` Note the empty line in the 'pub use' doc comments - because doc comments are concatenated as-is, this ensure that the doc comments on the definition start on a new line.
2019-07-16Update testsGuillaume Gomez-4/+4
2019-04-22Remove double trailing newlinesvarkor-3/+0
2019-04-14rustdoc: Remove default keyword from re-exported trait methodsOliver Middleton-0/+36
2019-01-31rustdoc: wrap stability tags in colored spansAndy Russell-1/+2
2018-12-25Remove licensesMark Rousskov-321/+1
2018-11-30tests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests.Eduard-Mihai Burtescu-0/+1
2018-11-30tests: remove ignore-stage1 where possible in proc_macro tests.Eduard-Mihai Burtescu-1/+0
2018-11-09don't inline `pub use some_crate` unless directly asked toQuietMisdreavus-0/+63
2018-10-15rustdoc: Use dyn keyword when rendering dynamic traitsOliver Middleton-2/+2
The dyn keyword has been stable for a while now so rustdoc should start using it.
2018-10-12Rollup merge of #54989 - Munksgaard:fix-htmldocck-typos, r=tmandrykennytm-3/+3
Fix spelling in the documentation to htmldocck.py I was reading through htmldocck.py, and decided to attempt to clean it up a little bit. Let me know if you disagree with my edits.
2018-10-11Include rustdoc tests that have been fixed by #33133Philip Munksgaard-3/+3
There was an issue (#33025) which caused these tests to not work. The issue has since been fixed in #33133, and so we can now include them.
2018-09-25add test for proc-macro re-exportQuietMisdreavus-0/+64
2018-09-20add more tests for traits-in-non-module-scopeQuietMisdreavus-0/+40
2018-08-25Update testsGuillaume Gomez-5/+0
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-17Stabilize `use_extern_macros`Vadim Petrochenkov-3/+0
2018-07-03test for renaming re-exported macrosQuietMisdreavus-0/+6
2018-06-17rustdoc: import cross-crate macros alongside everything elseQuietMisdreavus-0/+77
2018-06-15process cross-crate glob re-exportsQuietMisdreavus-0/+36
2018-06-06rustdoc: Fix missing stability and src links for inlined external macrosOliver Middleton-0/+49
2018-01-17Rollup merge of #47313 - ollie27:rustdoc_record_extern_trait, r=QuietMisdreavusGuillaume Gomez-0/+40
rustdoc: Populate external_traits with traits only seen in impls This means default methods can always be found and "Important traits" will include all spotlight traits.
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-1/+1
2018-01-10rustdoc: Populate external_traits with traits only seen in implsOliver Middleton-0/+40
This means default methods can always be found and "Important traits" will include all spotlight traits.
2017-11-29rustdoc: Fix issues with cross-crate inlined associated itemsOliver Middleton-0/+105
* Visibility was missing from impl items. * Attributes and docs were missing from consts and types in impls. * Const default values were missing from traits. This unifies the code that handles associated items from impls and traits.