summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
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-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".
2019-12-22Change bound order in rustfmt testMark Rousskov-2/+2
It is unclear why this changed, but since it seems like a harmless change, we're going to move forward with reformatting.
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-6/+6
2019-12-13Fix rustdoc testOliver Scherer-2/+4
2019-12-13Reuse the `staged_api` feature for `rustc_const_unstable`Oliver Scherer-1/+1
2019-12-11Rollup merge of #67074 - ehuss:extern-options, r=petrochenkovMazdak Farrokhzad-2/+1
Add options to --extern flag. This changes the `--extern` flag so that it can take a series of options that changes its behavior. The general syntax is `[opts ':'] name ['=' path]` where `opts` is a comma separated list of options. Two options are supported, `priv` which replaces `--extern-private` and `noprelude` which avoids adding the crate to the extern prelude. ```text --extern priv:mylib=/path/to/libmylib.rlib --extern noprelude:alloc=/path/to/liballoc.rlib ``` `noprelude` is to be used by Cargo's build-std feature in order to use `--extern` to reference standard library crates. This also includes a second commit which adds the `aux-crate` directive to compiletest. I can split this off into a separate PR if desired, but it helps with defining these kinds of tests. It is based on #54020, and can be used in the future to replace and simplify some of the Makefile tests.
2019-12-09compiletest: add aux-crate directiveEric Huss-2/+1
2019-12-04Remove potential cfgs duplicatesGuillaume Gomez-0/+15
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-1/+1
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-27Add support for intra-doc link fields of enum variantGuillaume Gomez-0/+14
2019-11-27Auto merge of #66675 - GuillaumeGomez:support-anchors-intra-doc-links, ↵bors-0/+12
r=kinnison Support anchors intra doc links Fixes #62833 Part of #43466. cc @ollie27 r? @kinnison
2019-11-26Fix spelling typosBrian Wignall-1/+1
2019-11-23Add test for anchorsGuillaume Gomez-0/+12
2019-11-23rustdoc: Mark `--extern-private` as unstableOliver Middleton-0/+1
It's not even stable in rustc so it shouldn't be stable in rustdoc.
2019-11-18Auto merge of #66238 - ehuss:stabilize-rustdoc-edition, r=GuillaumeGomezbors-1/+1
rustdoc: Stabilize `edition` annotation. The rustdoc `edition` annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a `rust` annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example: ```rust /// ```edition2018 /// // This code block was ignored on stable. /// ``` /// ```rust,edition2018 /// // This code block would use whatever edition is passed on the command line. /// ``` ``` AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release. Closes #65980