Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/rustdoc-html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ conflicts, in particular for simpler crate names).

Contains tests to check the display of items implementing the `Deref` and/or `DerefMut` traits.

## `tests/rustdoc-html/display`

Contains tests checking how items are displayed in the docs. Ensuring that methods with a lot
of arguments or with a lot of generics are correctly split between multiple lines for example.

## `tests/rustdoc-html/doc-cfg`

Contains tests to check the rustdoc `doc_cfg` feature.
Expand Down
File renamed without changes.
File renamed without changes.
29 changes: 0 additions & 29 deletions tests/rustdoc-html/hidden-methods.rs

This file was deleted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more appropriate in a doc-hidden directory.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No preference, so let's move it. :)

File renamed without changes.
2 changes: 2 additions & 0 deletions tests/rustdoc-html/reexport/auxiliary/pub-extern-crate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#![crate_name = "inner"]
pub struct SomeStruct;
40 changes: 40 additions & 0 deletions tests/rustdoc-html/reexport/hidden-methods.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#![crate_name = "foo"]

#[doc(hidden)]
pub mod hidden {
pub struct Foo;

impl Foo {
#[doc(hidden)]
pub fn this_should_be_hidden() {}
}

pub struct Bar;

impl Bar {
fn this_should_be_hidden() {}
}
}

//@ has foo/struct.Foo.html
// Only `not_hidden` should be present.
//@ count - '//*[@id="implementations-list"]//*[@class="method"]' 1
//@ has - '//*[@id="implementations-list"]//*[@class="method"]' 'pub fn not_hidden'
//@ count - '//*[@id="rustdoc-toc"]/*[@class="block method"]//a' 1
//@ has - '//*[@id="rustdoc-toc"]/*[@class="block method"]//a' 'not_hidden'
pub use hidden::Foo;

impl Foo {
pub fn not_hidden() {}
}

//@ has foo/struct.Bar.html
//@ count - '//*[@id="implementations-list"]//*[@class="method"]' 1
//@ has - '//*[@id="implementations-list"]//*[@class="method"]' 'pub fn not_hidden'
//@ count - '//*[@id="rustdoc-toc"]/*[@class="block method"]//a' 1
//@ has - '//*[@id="rustdoc-toc"]/*[@class="block method"]//a' 'not_hidden'
pub use hidden::Bar;

impl Bar {
pub fn not_hidden() {}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// This should fail a normal compile due to non_camel_case_types,
// It should pass a doc-compile as it only needs to type-check and
// therefore should not concern itself with the lints.

//@ check-pass

#[deny(warnings)]

//@ has cap_lints/struct.Foo.html //* 'Foo'
pub struct Foo {
field: i32,
}
Loading