summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2017-11-20Make rustdoc not include self-by-value methods from Deref targetFlorian Hartwig-8/+8
2017-11-18Auto merge of #46000 - kennytm:fix-45640-extern-type-ice-in-rustdoc, ↵bors-0/+28
r=QuietMisdreavus Support `extern type` in rustdoc. Fixes #45640. (cc #43467)
2017-11-15Remove Fn trait + impl Trait rustdoc testsChristopher Vittal-5/+9
2017-11-15Add/Modify tests for argument position impl TraitChristopher Vittal-4/+0
2017-11-15Support `extern type` in rustdoc.kennytm-0/+28
Fixes #45640.
2017-11-14Rollup merge of #45815 - QuietMisdreavus:happy-little-notices, r=GuillaumeGomezGuillaume Gomez-2/+2
rustdoc: tweak notes on ignore/compile_fail examples Part of https://github.com/rust-lang/rust/issues/44927 This is a softening of these notices to mention *why* a given example has a given callout, rather then telling viewers to be careful with an example. It also changes the character used for these samples from a warning logo to a circle-i/information logo. ![image](https://user-images.githubusercontent.com/5217170/32464361-5fbb5d9e-c305-11e7-8482-ce71b97a54df.png)
2017-11-13update codeblock-title test with new notice textQuietMisdreavus-2/+2
2017-11-07Add more elements in the sidebarGuillaume Gomez-0/+59
2017-11-07Rollup merge of #45764 - QuietMisdreavus:rustdoc-doctest-lints, r=GuillaumeGomezkennytm-4/+4
rustdoc: add #[allow(unused)] to every doctest More information in #45750 - this is behavior that was documented but not actually implemented. I also reordered how outer attributes are applied to doctests. Previously, attributes from `#![doc(test(attr(...)))]` would be applied *after* attributes from within the test itself, meaning if a doctest tried to override lints that would be set crate-wide, it wouldn't work at all. This gives a better scope of how lints can be applied. Closes #45750
2017-11-07Auto merge of #45620 - ollie27:rustdoc_impl_generic_dupe, r=QuietMisdreavusbors-0/+25
rustdoc: Fix duplicated impls with generics The same type can appear multiple times in impls so we need to use a set to avoid adding it multiple times. Fixes: #45584
2017-11-05add #![allow(unused)] to the playground link rustdoc testsQuietMisdreavus-4/+4
2017-11-04Rollup merge of #45746 - GuillaumeGomez:methods-doc-test, r=steveklabnikkennytm-0/+30
Add tests for methods listing in rust docs r? @rust-lang/docs
2017-11-03auto trait future compatibility lintleonardo.yvens-0/+3
2017-11-03Add tests for methods listing in rust docsGuillaume Gomez-0/+30
2017-10-29rustdoc: Fix duplicated impls with genericsOliver Middleton-0/+25
The same type can appear multiple times in impls so we need to use a set to avoid adding it multiple times.
2017-10-17modify tests to use new flagsteveklabnik-3/+3
2017-10-13Rollup merge of #44989 - QuietMisdreavus:what-is-your-quest, r=GuillaumeGomezkennytm-0/+13
let rustdoc print the crate version into docs This PR adds a new unstable flag to rustdoc, `--crate-version`, which when present will add a new entry to the sidebar of the root module, printing the given version number: ![Screenshot of a test crate, showing "Version 1.3.37" under the crate name](https://user-images.githubusercontent.com/5217170/31104096-805e3f4c-a7a0-11e7-96fc-368b6fe063d6.png) Closes #24336 (The WIP status is because i don't want to merge this until i can get the std docs to use it, which i need help from rustbuild people to make sure i get right.)
2017-10-09let rustdoc print the crate version into docsQuietMisdreavus-0/+13
2017-10-07Auto merge of #44892 - GuillaumeGomez:fnty-args-rustdoc, r=eddybbors-0/+15
Fnty args rustdoc Fixes #44570. cc @QuietMisdreavus cc @rust-lang/dev-tools Considering the impact on the `hir` libs, I'll put @eddyb as reviewer. r? @eddyb
2017-10-07Fix invalid rustdoc rendering for FnTy argsGuillaume Gomez-0/+15
2017-10-07Auto merge of #44860 - kennytm:fix-44731, r=alexcrichtonbors-0/+51
Fix issue #44731. Also excludes `impl Trait` from everybody_loops if it appears in the path. Fixes #44731.
2017-10-03Auto merge of #44949 - QuietMisdreavus:rustdoctest-dirs, r=nikomatsakisbors-0/+3
let htmldocck.py check for directories Since i messed this up during https://github.com/rust-lang/rust/pull/44613, i wanted to codify this into the rustdoc tests to make sure that doesn't happen again.
2017-10-02rustdoc: Remove cruft from the testVitaly _Vi Shukela-14/+4
per @GuillaumeGomez's sample, but with one change.
2017-09-30let htmldocck.py check for directoriesQuietMisdreavus-0/+3
2017-09-30rustdoc: A test for local and foreign [src] trait impl linksVitaly _Vi Shukela-0/+34
2017-09-26Fix issue #44731.kennytm-0/+51
Also excludes `impl Trait` from everybody_loops if it appears in the path.
2017-09-23Rollup merge of #44554 - GuillaumeGomez:add-missing-pub, r=QuietMisdreavusCorey Farwell-0/+31
Add pub visibility for methods as well Fixes #44527. r? @QuietMisdreavus
2017-09-19Add pub visibility for methods as wellGuillaume Gomez-0/+31
2017-09-17Rollup merge of #44397 - GuillaumeGomez:codeblock-color, r=QuietMisdreavusTim Neumann-0/+31
Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
2017-09-12Fix rendering of const keyword for functionsGuillaume Gomez-0/+27
2017-09-11add testGuillaume Gomez-0/+31
2017-09-01Fix testsNick Cameron-3/+3
This is just undoing changes from #41991 because we are not running markdown rendering twice.
2017-08-31Auto merge of #41991 - GuillaumeGomez:rustdoc-html-diff, r=nrcbors-3/+3
Add warnings when rustdoc html rendering differs
2017-08-30Temporary fix for a test (will require another update when this is fully merged)Guillaume Gomez-3/+3
2017-08-30Update unstable-crate testGuillaume Gomez-1/+1
2017-08-30Add warnings when rustdoc html rendering differsGuillaume Gomez-1/+1
2017-08-29Rollup merge of #43918 - mystor:rustdoc-pound, r=QuietMisdreavusAriel Ben-Yehuda-2/+6
Don't highlight # which does not start an attribute in rustdoc Currently when we highlight some macros for rustdoc (e.g. `quote!` from https://github.com/dtolnay/quote), we get really bad syntax highlighting, because we assume that every token between a `#` character and the next `]` in the source must be an attribute. This patch improves that highlighting behavior to instead only highlight after finding the `[` token after the `#` token. (NOTE: I've only run this patch against https://github.com/nrc/rustdoc-highlight so if it doesn't build on travis that's why - I don't have a recent rustc build on this laptop) I'm guessing r? @steveklabnik
2017-08-28Update test issue-41783.rs for new attribute highlighting behaviourMichael Layzell-2/+6
2017-08-24Add duplicate testGuillaume Gomez-0/+24
2017-08-15Exclude `impl Trait` functions from everybody_loops.kennytm-0/+32
Fixes #43869.
2017-08-13Rollup merge of #43782 - nrc:include, r=GuillaumeGomezGuillaume Gomez-0/+20
Fix include! in doc tests By making the path relative to the current file. Fixes #43153 [breaking-change] - if you use `include!` inside a doc test, you'll need to change the path to be relative to the current file rather than relative to the working directory.
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-0/+47
Expose all OS-specific modules in libstd doc. 1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc. 2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness. 3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed. Fixes #24658 (Does _not_ fully implement #1998).
2017-08-12Auto merge of #43736 - ollie27:rustdoc_impls_js, r=QuietMisdreavusbors-0/+15
rustdoc: Don't add external impls to implementors js Otherwise impls from not documented crates appear. Fixes #43701
2017-08-10doc tests: use the filename from the source file for doc test programs, ↵Nick Cameron-0/+20
rather than a dummy name
2017-08-10Implemented #[doc(cfg(...))].kennytm-0/+47
This attribute has two effects: 1. Items with this attribute and their children will have the "This is supported on **** only" message attached in the documentation. 2. The items' doc tests will be skipped if the configuration does not match.
2017-08-08rustdoc: Don't add external impls to implementors jsOliver Middleton-0/+15
Otherwise impls from not documented crates appear.
2017-08-07Remove \0 printingGuillaume Gomez-1/+1
2017-08-06Fix hoedown error in rustdocGuillaume Gomez-0/+18
2017-07-25Add tests for issues with the E-needstest labeltopecongiro-0/+15
2017-07-06remove associated_consts feature gateSean McArthur-7/+0