mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
Rollup merge of #163703 - GuillaumeGomez:clean-rustdoc-html-tests, r=Urgau
Move more `rustdoc-html tests` in the right location Follow-up of https://github.com/rust-lang/rust/pull/162372. r? @Urgau
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
//@ aux-build:issue-13698.rs
|
||||
//@ ignore-cross-compile
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/13698
|
||||
#![crate_name="issue_13698"]
|
||||
|
||||
extern crate issue_13698;
|
||||
|
||||
pub struct Foo;
|
||||
//@ !has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
|
||||
impl issue_13698::Foo for Foo {}
|
||||
|
||||
pub trait Bar {
|
||||
#[doc(hidden)]
|
||||
fn bar(&self) {}
|
||||
}
|
||||
|
||||
//@ !has issue_13698/struct.Foo.html '//*[@id="method.bar"]' 'fn bar'
|
||||
impl Bar for Foo {}
|
||||
@@ -3,6 +3,7 @@
|
||||
pub trait Foo {
|
||||
#[doc(hidden)]
|
||||
fn foo(&self) {}
|
||||
fn not_hidden(&self) {}
|
||||
}
|
||||
|
||||
impl Foo for i32 {}
|
||||
22
tests/rustdoc-html/reexport/doc-hidden-method-13698.rs
Normal file
22
tests/rustdoc-html/reexport/doc-hidden-method-13698.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
//@ aux-build:issue-13698.rs
|
||||
//@ ignore-cross-compile
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/13698
|
||||
#![crate_name="issue_13698"]
|
||||
|
||||
extern crate issue_13698;
|
||||
|
||||
pub struct Foo;
|
||||
//@ has 'issue_13698/struct.Foo.html'
|
||||
// There is only one visible trait impl method (from the `Foo` trait).
|
||||
//@ count - '//*[@id="trait-implementations-list"]//*[@class="method trait-impl"]' 1
|
||||
//@ has - '//*[@id="trait-implementations-list"]//*[@class="method trait-impl"]' \
|
||||
// 'fn not_hidden(&self)'
|
||||
impl issue_13698::Foo for Foo {}
|
||||
|
||||
pub trait Bar {
|
||||
#[doc(hidden)]
|
||||
fn bar(&self) {}
|
||||
}
|
||||
|
||||
impl Bar for Foo {}
|
||||
Reference in New Issue
Block a user