about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2020-05-08Add test for deprecated emojiGuillaume Gomez-2/+2
2020-05-06Rollup merge of #71918 - GuillaumeGomez:rename-methods-section, r=Dylan-DPCDylan DPC-12/+21
Rename methods section Fixes https://github.com/rust-lang/rust/issues/70475. It renames the section [methods](https://doc.rust-lang.org/nightly/std/string/struct.String.html#methods) into "Implementations". However, I didn't not update the title in the sidebar considering that it only lists methods under (even though I updated the link of the "methods" to make it point to the "implementations" section. r? @kinnison cc @rust-lang/rustdoc
2020-05-05Add test for new implementations section titleGuillaume Gomez-0/+9
2020-05-05Update testsGuillaume Gomez-12/+12
2020-04-29rustdoc supports const re-exportsMark Rousskov-7/+7
2020-04-20Fix show-const-contents rustdoc testLinus Färnstrand-1/+1
2020-04-08rustdoc: Don't try to load source files from external cratesOliver Middleton-1/+37
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-5/+6
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-23Rollup merge of #69494 - GuillaumeGomez:stabilize-crate-version, ↵Mazdak Farrokhzad-1/+1
r=ehuss,aleksator,ollie27 Stabilize --crate-version option in rustdoc I don't see any reason to not stabilize it anymore, so let's go! cc @kinnison @ehuss r? @ollie27
2020-03-17Update rustdoc test and remove TODO commentGuillaume Gomez-1/+1
2020-03-15Render full attributes in rustdocvarkor-0/+4
2020-03-10Auto merge of #66364 - Centril:cleanup-macro-def, r=petrochenkov,eddybbors-1/+1
Cleanup `rmeta::MacroDef` Avoid using rountrip parsing in the encoder and in `fn load_macro_untracked`. The main reason I was interested in this was to remove `rustc_parse` as a dependency of `rustc_metadata` but it seems like this had other benefits as well. Fixes #49511. r? @eddyb cc @matthewjasper @estebank @petrochenkov
2020-03-10pacify rustdoc by using better urlMazdak Farrokhzad-1/+1
2020-03-10Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnisonMazdak Farrokhzad-36/+0
Remove spotlight I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it. r? @kinnison cc @ollie27
2020-03-01Rollup merge of #69598 - ollie27:rustdoc_crate-version_escape, r=GuillaumeGomezDylan DPC-0/+6
rustdoc: HTML escape crate version As `--crate-version` accepts arbitrary strings they need to be escaped. r? @GuillaumeGomez
2020-03-01rustdoc: HTML escape crate versionOliver Middleton-0/+6
As `--crate-version` accepts arbitrary strings they need to be escaped.
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-27Remove "important traits" featureGuillaume Gomez-36/+0
2020-02-26Stabilize --crate-version option in rustdocGuillaume Gomez-1/+1
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.
2020-01-30Auto merge of #68325 - faern:move-numeric-consts-to-associated-consts-step1, ↵bors-3/+3
r=LukasKalbertodt Move numeric consts to associated consts step1 A subset of #67913. Implements the first step of RFC https://github.com/rust-lang/rfcs/pull/2700 This PR adds the new constants as unstable constants and defines the old ones in terms of the new ones. Then fix a tiny bit of code that started having naming collisions because of the new assoc consts. Removed a test that did not seem relevant any longer. Since doing just `u8::MIN` should now indeed be valid.
2020-01-26rustdoc: Fix re-exporting primitive typesOliver Middleton-0/+36
* Generate links to the primitive type docs for re-exports. * Don't ICE on cross crate primitive type re-exports. * Make primitive type re-exports show up cross crate.
2020-01-23Fix broken show-const-contents testLinus Färnstrand-3/+3
2020-01-22Auto merge of #68192 - GuillaumeGomez:remove-inlined-types, r=kinnisonbors-0/+6
Remove usage of global variable "inlined_types" r? @pietroalbini
2020-01-20Add aliases attribute checkGuillaume Gomez-0/+6
2020-01-20rustdoc: Correct order of `async` and `unsafe` in `async unsafe fn`sOliver Middleton-0/+7
2020-01-20Rollup merge of #68326 - ollie27:rustdoc_hightlight_fatal_errors, ↵Dylan DPC-0/+7
r=GuillaumeGomez rustdoc: Catch fatal errors when syntax highlighting For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`. Fixes #56885 r? @GuillaumeGomez
2020-01-18Rollup merge of #68224 - GuillaumeGomez:prevent-urls-in-headings, r=ollie27Mazdak Farrokhzad-0/+17
Prevent urls in headings Fixes #68215. cc @pietroalbini @ollie27 r? @kinnison
2020-01-17Rollup merge of #68093 - GuillaumeGomez:fix-deref-impl-typedef, r=oli-obkTyler Mandry-0/+33
Fix deref impl typedef Fixes #35295. r? @kinnison
2020-01-17rustdoc: Catch fatal errors when syntax highlightingOliver Middleton-0/+7
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
2020-01-17Extend url in heading test a bitGuillaume Gomez-1/+1
2020-01-16Rollup merge of #68263 - ollie27:rustdoc_invalid_syntax_highlight_escape, ↵Dylan DPC-0/+8
r=GuillaumeGomez rustdoc: HTML escape codeblocks which fail syntax highlighting r? @GuillaumeGomez
2020-01-16Extend url in titles testGuillaume Gomez-0/+5
2020-01-15rustdoc: HTML escape codeblocks which fail syntax highlightingOliver Middleton-0/+8
2020-01-15Fix rendering on sidebar and update testsGuillaume Gomez-7/+21
2020-01-15Add test for typedef derefGuillaume Gomez-0/+19
2020-01-14Prevent urls in headingsGuillaume Gomez-0/+12
2020-01-14Code review changes and fix rustdoc test.Ben Lewis-1/+1
2020-01-09Rollup merge of #67955 - ollie27:rustdoc_cfg_dupes, r=GuillaumeGomezYuki Okushi-3/+30
rustdoc: Remove more `#[doc(cfg(..))]` duplicates This is a follow up to #66959. r? @GuillaumeGomez
2020-01-09Rollup merge of #67875 - dtolnay:hidden, r=GuillaumeGomezYuki Okushi-5/+30
Distinguish between private items and hidden items in rustdoc I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document. This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another. Fixes #67851. Closes #60884.
2020-01-07Rollup merge of #67908 - ollie27:rustdoc_const_html_escape, r=GuillaumeGomezYuki Okushi-0/+10
rustdoc: HTML escape const values r? @GuillaumeGomez
2020-01-07Rollup merge of #67877 - dtolnay:const-_, r=nagisaYuki Okushi-0/+7
Omit underscore constants from rustdoc Underscore constants from https://github.com/rust-lang/rfcs/pull/2526 / https://github.com/rust-lang/rust/issues/54912 do not correspond to a nameable item and so are never useful in documentation. <br> #### Before: > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="https://user-images.githubusercontent.com/1940490/71771409-0427cc80-2eef-11ea-8b7d-d9c74a873e7e.png" width="60%"> #### After: > Not that.
2020-01-06rustdoc: Remove more `#[doc(cfg(..))]` duplicatesOliver Middleton-3/+30
2020-01-05rustdoc: HTML escape const valuesOliver Middleton-0/+10
2020-01-04Omit underscore constants from rustdocDavid Tolnay-0/+7
2020-01-04Distinguish between private items and hidden items in rustdocDavid Tolnay-5/+30
I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document. This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another.
2020-01-04rustdoc: Avoid panic when parsing codeblocks for playground linksOliver Middleton-0/+21
`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.
2019-12-24Show value for consts in the documentationOhad Ravid-7/+66
2019-12-23Rollup merge of #67507 - Mark-Simulacrum:purge-uninit, r=CentrilMazdak Farrokhzad-3/+2
Remove mem::uninitalized from tests This purges uses of uninitialized where possible from test cases. Some are merely moved over to the equally bad pattern of MaybeUninit::uninit().assume_init() but with an annotation that this is "the best we can do". Fixes #62397
2019-12-22Remove mem::uninitalized from testsMark Rousskov-3/+2
This purges uses of uninitialized where possible from test cases. Some are merely moved over to the equally bad pattern of MaybeUninit::uninit().assume_init() but with an annotation that this is "the best we can do".