| Age | Commit message (Collapse) | Author | Lines |
|
|
|
r=QuietMisdreavus
Support `extern type` in rustdoc.
Fixes #45640.
(cc #43467)
|
|
|
|
|
|
Fixes #45640.
|
|
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.

|
|
|
|
|
|
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
|
|
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
|
|
|
|
Add tests for methods listing in rust docs
r? @rust-lang/docs
|
|
|
|
|
|
The same type can appear multiple times in impls so we need to use a set
to avoid adding it multiple times.
|
|
|
|
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:

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.)
|
|
|
|
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
|
|
|
|
Fix issue #44731.
Also excludes `impl Trait` from everybody_loops if it appears in the path.
Fixes #44731.
|
|
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.
|
|
per @GuillaumeGomez's sample, but with one change.
|
|
|
|
|
|
Also excludes `impl Trait` from everybody_loops if it appears in the path.
|
|
Add pub visibility for methods as well
Fixes #44527.
r? @QuietMisdreavus
|
|
|
|
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
|
|
|
|
|
|
This is just undoing changes from #41991 because we are not running markdown rendering twice.
|
|
Add warnings when rustdoc html rendering differs
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
Fixes #43869.
|
|
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.
|
|
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).
|
|
rustdoc: Don't add external impls to implementors js
Otherwise impls from not documented crates appear.
Fixes #43701
|
|
rather than a dummy name
|
|
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.
|
|
Otherwise impls from not documented crates appear.
|
|
|
|
|
|
|
|
|