Update @!has
name in tests
This commit is contained in:
parent
9db6061d64
commit
b34e2404fd
49 changed files with 127 additions and 127 deletions
|
@ -24,5 +24,5 @@ mod private_module {
|
|||
}
|
||||
|
||||
// @has foo/all.html '//a[@href="struct.ReexportedStruct.html"]' 'ReexportedStruct'
|
||||
// @!has foo/all.html 'private_module'
|
||||
// @!hasraw foo/all.html 'private_module'
|
||||
pub use private_module::ReexportedStruct;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub trait Foo {
|
|||
const FOO: usize = 12 + 1;
|
||||
// @has - '//*[@id="associatedconstant.FOO_NO_DEFAULT"]' 'const FOO_NO_DEFAULT: bool'
|
||||
const FOO_NO_DEFAULT: bool;
|
||||
// @!has - FOO_HIDDEN
|
||||
// @!hasraw - FOO_HIDDEN
|
||||
#[doc(hidden)]
|
||||
const FOO_HIDDEN: u8 = 0;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ impl Foo for Bar {
|
|||
const FOO: usize = 12;
|
||||
// @has - '//*[@id="associatedconstant.FOO_NO_DEFAULT"]' 'const FOO_NO_DEFAULT: bool'
|
||||
const FOO_NO_DEFAULT: bool = false;
|
||||
// @!has - FOO_HIDDEN
|
||||
// @!hasraw - FOO_HIDDEN
|
||||
#[doc(hidden)]
|
||||
const FOO_HIDDEN: u8 = 0;
|
||||
}
|
||||
|
@ -50,9 +50,9 @@ impl Bar {
|
|||
}
|
||||
|
||||
impl Bar {
|
||||
// @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
|
||||
// @!hasraw assoc_consts/struct.Bar.html 'BAR_PRIVATE'
|
||||
const BAR_PRIVATE: char = 'a';
|
||||
// @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
|
||||
// @!hasraw assoc_consts/struct.Bar.html 'BAR_HIDDEN'
|
||||
#[doc(hidden)]
|
||||
pub const BAR_HIDDEN: &'static str = "a";
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ pub const fn foo() -> u32 { 42 }
|
|||
pub const unsafe fn foo_unsafe() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.foo2.html' '//pre' 'pub const fn foo2() -> u32'
|
||||
// @!has - '//span[@class="since"]'
|
||||
// @!hasraw - '//span[@class="since"]'
|
||||
#[unstable(feature = "humans", issue = "none")]
|
||||
pub const fn foo2() -> u32 { 42 }
|
||||
|
||||
|
@ -32,7 +32,7 @@ pub const fn bar2() -> u32 { 42 }
|
|||
|
||||
|
||||
// @has 'foo/fn.foo2_gated.html' '//pre' 'pub const unsafe fn foo2_gated() -> u32'
|
||||
// @!has - '//span[@class="since"]'
|
||||
// @!hasraw - '//span[@class="since"]'
|
||||
#[unstable(feature = "foo2", issue = "none")]
|
||||
pub const unsafe fn foo2_gated() -> u32 { 42 }
|
||||
|
||||
|
@ -43,7 +43,7 @@ pub const unsafe fn foo2_gated() -> u32 { 42 }
|
|||
pub const unsafe fn bar2_gated() -> u32 { 42 }
|
||||
|
||||
// @has 'foo/fn.bar_not_gated.html' '//pre' 'pub const unsafe fn bar_not_gated() -> u32'
|
||||
// @!has - '//span[@class="since"]'
|
||||
// @!hasraw - '//span[@class="since"]'
|
||||
pub const unsafe fn bar_not_gated() -> u32 { 42 }
|
||||
|
||||
pub struct Foo;
|
||||
|
|
|
@ -75,7 +75,7 @@ impl Bar for Foo1 {
|
|||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.7: fn_def_def_with_doc'
|
||||
// @hasraw - 'fn_def_def_with_doc short'
|
||||
// @!has - 'fn_def_def_with_doc full'
|
||||
// @!hasraw - 'fn_def_def_with_doc full'
|
||||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc'
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ pub struct Foo2;
|
|||
impl Bar for Foo2 {
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.3: fn_empty_with_doc'
|
||||
// @hasraw - 'fn_empty_with_doc short'
|
||||
// @!has - 'fn_empty_with_doc full'
|
||||
// @!hasraw - 'fn_empty_with_doc full'
|
||||
fn fn_empty_with_doc() {}
|
||||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.4: fn_empty_without_doc'
|
||||
|
@ -99,7 +99,7 @@ impl Bar for Foo2 {
|
|||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.5: fn_def_with_doc'
|
||||
// @hasraw - 'fn_def_with_doc short'
|
||||
// @!has - 'fn_def_with_doc full'
|
||||
// @!hasraw - 'fn_def_with_doc full'
|
||||
fn fn_def_with_doc() {}
|
||||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.6: fn_def_without_doc'
|
||||
|
@ -112,7 +112,7 @@ impl Bar for Foo2 {
|
|||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.7: fn_def_def_with_doc'
|
||||
// @hasraw - 'fn_def_def_with_doc short'
|
||||
// @!has - 'fn_def_def_with_doc full'
|
||||
// @!hasraw - 'fn_def_def_with_doc full'
|
||||
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc'
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
pub struct Foo;
|
||||
|
||||
// @has foo/struct.Foo.html
|
||||
// @!has - 'Auto Trait Implementations'
|
||||
// @!hasraw - 'Auto Trait Implementations'
|
||||
impl !Send for Foo {}
|
||||
impl !Sync for Foo {}
|
||||
impl !std::marker::Unpin for Foo {}
|
||||
|
|
|
@ -11,7 +11,7 @@ pub mod __hidden {
|
|||
}
|
||||
|
||||
// @has foo/trait.Clone.html
|
||||
// @!has - 'Foo'
|
||||
// @!hasraw - 'Foo'
|
||||
// @has implementors/core/clone/trait.Clone.js
|
||||
// @!has - 'Foo'
|
||||
// @!hasraw - 'Foo'
|
||||
pub use std::clone::Clone;
|
||||
|
|
|
@ -15,5 +15,5 @@
|
|||
/// ```
|
||||
pub fn foo() {}
|
||||
|
||||
// @!has hidden_line/fn.foo.html invisible
|
||||
// @!hasraw hidden_line/fn.foo.html invisible
|
||||
// @matches - //pre "#\[derive\(PartialEq\)\] // Bar"
|
||||
|
|
|
@ -17,13 +17,13 @@ pub mod hidden {
|
|||
}
|
||||
|
||||
// @has foo/struct.Foo.html
|
||||
// @!has - 'Methods'
|
||||
// @!hasraw - 'Methods'
|
||||
// @!has - '//code' 'impl Foo'
|
||||
// @!has - 'this_should_be_hidden'
|
||||
// @!hasraw - 'this_should_be_hidden'
|
||||
pub use hidden::Foo;
|
||||
|
||||
// @has foo/struct.Bar.html
|
||||
// @!has - 'Methods'
|
||||
// @!hasraw - 'Methods'
|
||||
// @!has - '//code' 'impl Bar'
|
||||
// @!has - 'this_should_be_hidden'
|
||||
// @!hasraw - 'this_should_be_hidden'
|
||||
pub use hidden::Bar;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
extern crate assoc_items;
|
||||
|
||||
// @has foo/struct.MyStruct.html
|
||||
// @!has - 'PrivateConst'
|
||||
// @!hasraw - 'PrivateConst'
|
||||
// @has - '//*[@id="associatedconstant.PublicConst"]' 'pub const PublicConst: u8'
|
||||
// @has - '//*[@class="docblock"]' 'docs for PublicConst'
|
||||
// @!has - 'private_method'
|
||||
// @!hasraw - 'private_method'
|
||||
// @has - '//*[@id="method.public_method"]' 'pub fn public_method()'
|
||||
// @has - '//*[@class="docblock"]' 'docs for public_method'
|
||||
// @has - '//*[@id="associatedconstant.ConstNoDefault"]' 'const ConstNoDefault: i16'
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
extern crate rustdoc_hidden;
|
||||
|
||||
// @has hidden_use/index.html
|
||||
// @!has - 'rustdoc_hidden'
|
||||
// @!has - 'Bar'
|
||||
// @!hasraw - 'rustdoc_hidden'
|
||||
// @!hasraw - 'Bar'
|
||||
// @!has hidden_use/struct.Bar.html
|
||||
#[doc(hidden)]
|
||||
pub use rustdoc_hidden::Bar;
|
||||
|
|
|
@ -14,7 +14,7 @@ pub use mod1::*;
|
|||
// @has foo/index.html
|
||||
// @hasraw - "mod1"
|
||||
// @hasraw - "public_fn"
|
||||
// @!has - "private_fn"
|
||||
// @!hasraw - "private_fn"
|
||||
// @has foo/fn.public_fn.html
|
||||
// @!has foo/fn.private_fn.html
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ mod mod1 {
|
|||
pub use mod1::*;
|
||||
|
||||
// @has foo/index.html
|
||||
// @!has - "mod1"
|
||||
// @!hasraw - "mod1"
|
||||
// @hasraw - "public_fn"
|
||||
// @!has - "private_fn"
|
||||
// @!hasraw - "private_fn"
|
||||
// @has foo/fn.public_fn.html
|
||||
// @!has foo/fn.private_fn.html
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ pub use mod1::*;
|
|||
// @has foo/index.html
|
||||
// @hasraw - "mod1"
|
||||
// @hasraw - "Mod1Public"
|
||||
// @!has - "Mod1Private"
|
||||
// @!has - "mod2"
|
||||
// @!hasraw - "Mod1Private"
|
||||
// @!hasraw - "mod2"
|
||||
// @hasraw - "Mod2Public"
|
||||
// @!has - "Mod2Private"
|
||||
// @!hasraw - "Mod2Private"
|
||||
// @has foo/struct.Mod1Public.html
|
||||
// @!has foo/struct.Mod1Private.html
|
||||
// @has foo/struct.Mod2Public.html
|
||||
|
@ -30,8 +30,8 @@ pub use mod1::*;
|
|||
// @hasraw - "mod2"
|
||||
// @hasraw - "Mod1Public"
|
||||
// @hasraw - "Mod1Private"
|
||||
// @!has - "Mod2Public"
|
||||
// @!has - "Mod2Private"
|
||||
// @!hasraw - "Mod2Public"
|
||||
// @!hasraw - "Mod2Private"
|
||||
// @has foo/mod1/struct.Mod1Public.html
|
||||
// @has foo/mod1/struct.Mod1Private.html
|
||||
// @!has foo/mod1/struct.Mod2Public.html
|
||||
|
|
|
@ -13,12 +13,12 @@ mod mod1 {
|
|||
pub use mod1::*;
|
||||
|
||||
// @has foo/index.html
|
||||
// @!has - "mod1"
|
||||
// @!hasraw - "mod1"
|
||||
// @hasraw - "Mod1Public"
|
||||
// @!has - "Mod1Private"
|
||||
// @!has - "mod2"
|
||||
// @!hasraw - "Mod1Private"
|
||||
// @!hasraw - "mod2"
|
||||
// @hasraw - "Mod2Public"
|
||||
// @!has - "Mod2Private"
|
||||
// @!hasraw - "Mod2Private"
|
||||
// @has foo/struct.Mod1Public.html
|
||||
// @!has foo/struct.Mod1Private.html
|
||||
// @has foo/struct.Mod2Public.html
|
||||
|
|
|
@ -3,8 +3,8 @@ mod private {
|
|||
}
|
||||
|
||||
// @has hidden_use/index.html
|
||||
// @!has - 'private'
|
||||
// @!has - 'Foo'
|
||||
// @!hasraw - 'private'
|
||||
// @!hasraw - 'Foo'
|
||||
// @!has hidden_use/struct.Foo.html
|
||||
#[doc(hidden)]
|
||||
pub use private::Foo;
|
||||
|
|
|
@ -7,7 +7,7 @@ macro_rules! foo {
|
|||
|
||||
// @has macro_by_example/macros/index.html
|
||||
pub mod macros {
|
||||
// @!has - 'pub use foo as bar;'
|
||||
// @!hasraw - 'pub use foo as bar;'
|
||||
// @has macro_by_example/macros/macro.bar.html
|
||||
// @has - '//*[@class="docblock"]' 'docs for foo'
|
||||
// @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
|
||||
|
|
|
@ -4,7 +4,7 @@ pub mod foo {
|
|||
|
||||
// @has please_inline/a/index.html
|
||||
pub mod a {
|
||||
// @!has - 'pub use foo::'
|
||||
// @!hasraw - 'pub use foo::'
|
||||
// @has please_inline/a/struct.Foo.html
|
||||
#[doc(inline)]
|
||||
pub use foo::Foo;
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
// Check that the unstable marker is not added for "rustc_private".
|
||||
|
||||
// @!matches internal/index.html \
|
||||
// @!matchesraw internal/index.html \
|
||||
// '//*[@class="item-right docblock-short"]/span[@class="stab unstable"]'
|
||||
// @!matches internal/index.html \
|
||||
// @!matchesraw internal/index.html \
|
||||
// '//*[@class="item-right docblock-short"]/span[@class="stab internal"]'
|
||||
// @matches - '//*[@class="item-right docblock-short"]' 'Docs'
|
||||
|
||||
// @!has internal/struct.S.html '//*[@class="stab unstable"]'
|
||||
// @!has internal/struct.S.html '//*[@class="stab internal"]'
|
||||
// @!hasraw internal/struct.S.html '//*[@class="stab unstable"]'
|
||||
// @!hasraw internal/struct.S.html '//*[@class="stab internal"]'
|
||||
/// Docs
|
||||
pub struct S;
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ doc! {
|
|||
|
||||
// @has issue_23812/Foo/index.html
|
||||
// @hasraw - 'Outer comment'
|
||||
// @!has - '/// Outer comment'
|
||||
// @!hasraw - '/// Outer comment'
|
||||
// @hasraw - 'Inner comment'
|
||||
// @!has - '//! Inner comment'
|
||||
// @!hasraw - '//! Inner comment'
|
||||
|
||||
|
||||
doc! {
|
||||
|
@ -31,6 +31,6 @@ doc! {
|
|||
|
||||
// @has issue_23812/Bar/index.html
|
||||
// @hasraw - 'Outer block comment'
|
||||
// @!has - '/** Outer block comment */'
|
||||
// @!hasraw - '/** Outer block comment */'
|
||||
// @hasraw - 'Inner block comment'
|
||||
// @!has - '/*! Inner block comment */'
|
||||
// @!hasraw - '/*! Inner block comment */'
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// ignore-cross-compile
|
||||
|
||||
// @has issue_27104/index.html
|
||||
// @!has - 'extern crate std'
|
||||
// @!has - 'use std::prelude::'
|
||||
// @!hasraw - 'extern crate std'
|
||||
// @!hasraw - 'use std::prelude::'
|
||||
|
||||
// @hasraw - 'pub extern crate empty'
|
||||
pub extern crate empty;
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
extern crate issue_29584;
|
||||
|
||||
// @has issue_29584/struct.Foo.html
|
||||
// @!has - 'impl Bar for'
|
||||
// @!hasraw - 'impl Bar for'
|
||||
pub use issue_29584::Foo;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// @has issue_31899/index.html
|
||||
// @hasraw - 'Make this line a bit longer.'
|
||||
// @!has - 'rust rust-example-rendered'
|
||||
// @!has - 'use ndarray::arr2'
|
||||
// @!has - 'prohibited'
|
||||
// @!hasraw - 'rust rust-example-rendered'
|
||||
// @!hasraw - 'use ndarray::arr2'
|
||||
// @!hasraw - 'prohibited'
|
||||
|
||||
/// A tuple or fixed size array that can be used to index an array.
|
||||
/// Make this line a bit longer.
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
// ignore-cross-compile
|
||||
|
||||
// @has variant_struct/enum.Foo.html
|
||||
// @!has - 'pub qux'
|
||||
// @!has - 'pub(crate) qux'
|
||||
// @!has - 'pub Bar'
|
||||
// @!hasraw - 'pub qux'
|
||||
// @!hasraw - 'pub(crate) qux'
|
||||
// @!hasraw - 'pub Bar'
|
||||
extern crate variant_struct;
|
||||
|
||||
// @has issue_32395/enum.Foo.html
|
||||
// @!has - 'pub qux'
|
||||
// @!has - 'pub(crate) qux'
|
||||
// @!has - 'pub Bar'
|
||||
// @!hasraw - 'pub qux'
|
||||
// @!hasraw - 'pub(crate) qux'
|
||||
// @!hasraw - 'pub Bar'
|
||||
pub use variant_struct::Foo;
|
||||
|
|
|
@ -5,7 +5,7 @@ mod second {
|
|||
}
|
||||
|
||||
// @has foo/index.html
|
||||
// @!has - SomeTypeWithLongName
|
||||
// @!hasraw - SomeTypeWithLongName
|
||||
// @has foo/struct.SomeType.html
|
||||
// @!has foo/struct.SomeTypeWithLongName.html
|
||||
pub use second::{SomeTypeWithLongName as SomeType};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @has issue_41783/struct.Foo.html
|
||||
// @!has - 'space'
|
||||
// @!has - 'comment'
|
||||
// @!hasraw - 'space'
|
||||
// @!hasraw - 'comment'
|
||||
// @hasraw - '# <span class="ident">single'
|
||||
// @hasraw - '## <span class="ident">double</span>'
|
||||
// @hasraw - '### <span class="ident">triple</span>'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
extern crate issue_53689;
|
||||
|
||||
// @has foo/trait.MyTrait.html
|
||||
// @!has - 'MyStruct'
|
||||
// @!hasraw - 'MyStruct'
|
||||
// @count - '//*[h3="impl<T> MyTrait for T"]' 1
|
||||
pub trait MyTrait {}
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ extern crate foo;
|
|||
// @has issue_61592/index.html
|
||||
// @has - '//a[@href="#reexports"]' 'Re-exports'
|
||||
// @has - '//code' 'pub use foo::FooTrait as _;'
|
||||
// @!has - '//a[@href="trait._.html"]'
|
||||
// @!hasraw - '//a[@href="trait._.html"]'
|
||||
pub use foo::FooTrait as _;
|
||||
|
||||
// @has issue_61592/index.html
|
||||
// @has - '//a[@href="#reexports"]' 'Re-exports'
|
||||
// @has - '//code' 'pub use foo::FooStruct as _;'
|
||||
// @!has - '//a[@href="struct._.html"]'
|
||||
// @!hasraw - '//a[@href="struct._.html"]'
|
||||
pub use foo::FooStruct as _;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#![feature(no_core)]
|
||||
|
||||
// @matchesraw 'issue_89852/sidebar-items.js' '"repro"'
|
||||
// @!matches 'issue_89852/sidebar-items.js' '"repro".*"repro"'
|
||||
// @!matchesraw 'issue_89852/sidebar-items.js' '"repro".*"repro"'
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! repro {
|
||||
|
|
|
@ -18,7 +18,7 @@ macro_rules! a_macro {
|
|||
}
|
||||
|
||||
// @hasraw macro_document_private_duplicate/index.html 'Doc 2.'
|
||||
// @!has macro_document_private_duplicate/macro.a_macro.html 'Doc 2.'
|
||||
// @!hasraw macro_document_private_duplicate/macro.a_macro.html 'Doc 2.'
|
||||
/// Doc 2.
|
||||
macro_rules! a_macro {
|
||||
() => ()
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
// This is a regression text for issue #88453.
|
||||
#![feature(decl_macro)]
|
||||
|
||||
// @!has macro_private_not_documented/index.html 'a_macro'
|
||||
// @!hasraw macro_private_not_documented/index.html 'a_macro'
|
||||
// @!has macro_private_not_documented/macro.a_macro.html
|
||||
macro_rules! a_macro {
|
||||
() => ()
|
||||
}
|
||||
|
||||
// @!has macro_private_not_documented/index.html 'another_macro'
|
||||
// @!hasraw macro_private_not_documented/index.html 'another_macro'
|
||||
// @!has macro_private_not_documented/macro.another_macro.html
|
||||
macro another_macro {
|
||||
() => ()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//! [link]: https://example.com
|
||||
|
||||
// @hasraw search-index.js 'This <em>summary</em> has a link and <code>code</code>.'
|
||||
// @!has - 'second paragraph'
|
||||
// @!hasraw - 'second paragraph'
|
||||
|
||||
/// This `code` will be rendered in a code tag.
|
||||
///
|
||||
|
@ -17,11 +17,11 @@ pub struct Sidebar;
|
|||
|
||||
// @hasraw search-index.js 'This <code>code</code> will be rendered in a code tag.'
|
||||
// @hasraw summaries/sidebar-items.js 'This `code` will be rendered in a code tag.'
|
||||
// @!has - 'text should not be rendered'
|
||||
// @!hasraw - 'text should not be rendered'
|
||||
|
||||
/// ```text
|
||||
/// this block should not be rendered
|
||||
/// ```
|
||||
pub struct Sidebar2;
|
||||
|
||||
// @!has summaries/sidebar-items.js 'block should not be rendered'
|
||||
// @!hasraw summaries/sidebar-items.js 'block should not be rendered'
|
||||
|
|
|
@ -7,24 +7,24 @@
|
|||
#[doc(masked)]
|
||||
extern crate masked;
|
||||
|
||||
// @!has 'search-index.js' 'masked_method'
|
||||
// @!hasraw 'search-index.js' 'masked_method'
|
||||
|
||||
// @!has 'foo/struct.String.html' 'MaskedTrait'
|
||||
// @!has 'foo/struct.String.html' 'masked_method'
|
||||
// @!hasraw 'foo/struct.String.html' 'MaskedTrait'
|
||||
// @!hasraw 'foo/struct.String.html' 'masked_method'
|
||||
pub use std::string::String;
|
||||
|
||||
// @!has 'foo/trait.Clone.html' 'MaskedStruct'
|
||||
// @!hasraw 'foo/trait.Clone.html' 'MaskedStruct'
|
||||
pub use std::clone::Clone;
|
||||
|
||||
// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
|
||||
// @!has 'foo/struct.MyStruct.html' 'masked_method'
|
||||
// @!hasraw 'foo/struct.MyStruct.html' 'MaskedTrait'
|
||||
// @!hasraw 'foo/struct.MyStruct.html' 'masked_method'
|
||||
pub struct MyStruct;
|
||||
|
||||
impl masked::MaskedTrait for MyStruct {
|
||||
fn masked_method() {}
|
||||
}
|
||||
|
||||
// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
|
||||
// @!hasraw 'foo/trait.MyTrait.html' 'MaskedStruct'
|
||||
pub trait MyTrait {}
|
||||
|
||||
impl MyTrait for masked::MaskedStruct {}
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
pub use std::marker::Send;
|
||||
|
||||
// @!has foo/index.html 'Implementations'
|
||||
// @!hasraw foo/index.html 'Implementations'
|
||||
|
|
|
@ -15,14 +15,14 @@ mod a_module {
|
|||
pub use a_nested_module::a_nested_public_function as another_nested_public_function;
|
||||
}
|
||||
|
||||
// @!has aCrate/a_nested_module/index.html 'yet_another_nested_public_function'
|
||||
// @!hasraw aCrate/a_nested_module/index.html 'yet_another_nested_public_function'
|
||||
pub use a_nested_module::a_nested_public_function as yet_another_nested_public_function;
|
||||
|
||||
// @!has aCrate/a_nested_module/index.html 'one_last_nested_public_function'
|
||||
// @!hasraw aCrate/a_nested_module/index.html 'one_last_nested_public_function'
|
||||
pub use a_nested_module::another_nested_public_function as one_last_nested_public_function;
|
||||
}
|
||||
|
||||
// @!has aCrate/index.html 'a_module'
|
||||
// @!hasraw aCrate/index.html 'a_module'
|
||||
// @has aCrate/index.html '//a[@href="a_nested_module/index.html"]' 'a_nested_module'
|
||||
pub use a_module::a_nested_module;
|
||||
|
||||
|
@ -36,7 +36,7 @@ pub use a_module::{
|
|||
};
|
||||
|
||||
// @has aCrate/index.html '//a[@href="fn.private_function.html"]' 'private_function'
|
||||
// @!has aCrate/fn.private_function.html 'a_module'
|
||||
// @!hasraw aCrate/fn.private_function.html 'a_module'
|
||||
// @has aCrate/index.html '//a[@href="fn.other_private_function.html"]' 'other_private_function'
|
||||
// @!has aCrate/fn.other_private_function.html 'a_module'
|
||||
// @!hasraw aCrate/fn.other_private_function.html 'a_module'
|
||||
pub use a_module::{other_private_function, private_function};
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
// compile-flags: -Z unstable-options --disable-per-crate-search
|
||||
|
||||
// @!has 'foo/struct.Foo.html' '//*[id="crate-search"]'
|
||||
// @!hasraw 'foo/struct.Foo.html' '//*[id="crate-search"]'
|
||||
pub struct Foo;
|
||||
|
|
|
@ -51,7 +51,7 @@ impl G {
|
|||
|
||||
// @has recursive_deref/struct.D.html '//h3[@class="code-header in-band"]' 'impl Deref for D'
|
||||
// We also check that `G::g` method isn't rendered because there is no `self` argument.
|
||||
// @!has '-' '//*[@id="deref-methods-G"]'
|
||||
// @!hasraw '-' '//*[@id="deref-methods-G"]'
|
||||
impl Deref for D {
|
||||
type Target = E;
|
||||
|
||||
|
@ -62,7 +62,7 @@ impl Deref for D {
|
|||
|
||||
// @has recursive_deref/struct.E.html '//h3[@class="code-header in-band"]' 'impl Deref for E'
|
||||
// We also check that `G::g` method isn't rendered because there is no `self` argument.
|
||||
// @!has '-' '//*[@id="deref-methods-G"]'
|
||||
// @!hasraw '-' '//*[@id="deref-methods-G"]'
|
||||
impl Deref for E {
|
||||
type Target = F;
|
||||
|
||||
|
@ -73,7 +73,7 @@ impl Deref for E {
|
|||
|
||||
// @has recursive_deref/struct.F.html '//h3[@class="code-header in-band"]' 'impl Deref for F'
|
||||
// We also check that `G::g` method isn't rendered because there is no `self` argument.
|
||||
// @!has '-' '//*[@id="deref-methods-G"]'
|
||||
// @!hasraw '-' '//*[@id="deref-methods-G"]'
|
||||
impl Deref for F {
|
||||
type Target = G;
|
||||
|
||||
|
@ -101,7 +101,7 @@ impl I {
|
|||
}
|
||||
|
||||
// @has recursive_deref/struct.H.html '//h3[@class="code-header in-band"]' 'impl Deref for H'
|
||||
// @!has '-' '//*[@id="deref-methods-I"]'
|
||||
// @!hasraw '-' '//*[@id="deref-methods-I"]'
|
||||
impl Deref for H {
|
||||
type Target = I;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#![crate_name = "foo"]
|
||||
|
||||
// @has foo/fn.foo.html
|
||||
// @!has - '//a[@href="http://a.a"]'
|
||||
// @!hasraw - '//a[@href="http://a.a"]'
|
||||
// @has - '//a[@href="#implementing-stuff-somewhere"]' 'Implementing stuff somewhere'
|
||||
// @has - '//a[@href="#another-one-urg"]' 'Another one urg'
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#![crate_name = "foo"]
|
||||
|
||||
// @hasraw 'search-index.js' 'Foo short link.'
|
||||
// @!has - 'www.example.com'
|
||||
// @!has - 'More Foo.'
|
||||
// @!hasraw - 'www.example.com'
|
||||
// @!hasraw - 'More Foo.'
|
||||
|
||||
/// Foo short [link](https://www.example.com/).
|
||||
///
|
||||
|
|
|
@ -9,18 +9,18 @@ mod private {
|
|||
pub struct Foo;
|
||||
impl Foo {
|
||||
pub fn test_method() {} // @hasraw - test_method
|
||||
fn priv_method() {} // @!has - priv_method
|
||||
fn priv_method() {} // @!hasraw - priv_method
|
||||
}
|
||||
|
||||
pub trait PrivateTrait {
|
||||
fn trait_method(&self) {} // @!has - priv_method
|
||||
fn trait_method(&self) {} // @!hasraw - priv_method
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Bar;
|
||||
|
||||
impl Deref for Bar {
|
||||
// @!has search-index.js Target
|
||||
// @!hasraw search-index.js Target
|
||||
type Target = Bar;
|
||||
fn deref(&self) -> &Bar { self }
|
||||
}
|
||||
|
|
|
@ -2,49 +2,49 @@
|
|||
// documentation.
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_S.html 'show this'
|
||||
// @!has show_const_contents/constant.CONST_S.html '; //'
|
||||
// @!hasraw show_const_contents/constant.CONST_S.html '; //'
|
||||
pub const CONST_S: &'static str = "show this";
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_I32.html '= 42;'
|
||||
// @!has show_const_contents/constant.CONST_I32.html '; //'
|
||||
// @!hasraw show_const_contents/constant.CONST_I32.html '; //'
|
||||
pub const CONST_I32: i32 = 42;
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_I32_HEX.html '= 0x42;'
|
||||
// @!has show_const_contents/constant.CONST_I32_HEX.html '; //'
|
||||
// @!hasraw show_const_contents/constant.CONST_I32_HEX.html '; //'
|
||||
pub const CONST_I32_HEX: i32 = 0x42;
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_NEG_I32.html '= -42;'
|
||||
// @!has show_const_contents/constant.CONST_NEG_I32.html '; //'
|
||||
// @!hasraw show_const_contents/constant.CONST_NEG_I32.html '; //'
|
||||
pub const CONST_NEG_I32: i32 = -42;
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_EQ_TO_VALUE_I32.html '= 42i32;'
|
||||
// @!has show_const_contents/constant.CONST_EQ_TO_VALUE_I32.html '// 42i32'
|
||||
// @!hasraw show_const_contents/constant.CONST_EQ_TO_VALUE_I32.html '// 42i32'
|
||||
pub const CONST_EQ_TO_VALUE_I32: i32 = 42i32;
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_CALC_I32.html '= _; // 43i32'
|
||||
pub const CONST_CALC_I32: i32 = 42 + 1;
|
||||
|
||||
// @!has show_const_contents/constant.CONST_REF_I32.html '= &42;'
|
||||
// @!has show_const_contents/constant.CONST_REF_I32.html '; //'
|
||||
// @!hasraw show_const_contents/constant.CONST_REF_I32.html '= &42;'
|
||||
// @!hasraw show_const_contents/constant.CONST_REF_I32.html '; //'
|
||||
pub const CONST_REF_I32: &'static i32 = &42;
|
||||
|
||||
// @hasraw show_const_contents/constant.CONST_I32_MAX.html '= i32::MAX; // 2_147_483_647i32'
|
||||
pub const CONST_I32_MAX: i32 = i32::MAX;
|
||||
|
||||
// @!has show_const_contents/constant.UNIT.html '= ();'
|
||||
// @!has show_const_contents/constant.UNIT.html '; //'
|
||||
// @!hasraw show_const_contents/constant.UNIT.html '= ();'
|
||||
// @!hasraw show_const_contents/constant.UNIT.html '; //'
|
||||
pub const UNIT: () = ();
|
||||
|
||||
pub struct MyType(i32);
|
||||
|
||||
// @!has show_const_contents/constant.MY_TYPE.html '= MyType(42);'
|
||||
// @!has show_const_contents/constant.MY_TYPE.html '; //'
|
||||
// @!hasraw show_const_contents/constant.MY_TYPE.html '= MyType(42);'
|
||||
// @!hasraw show_const_contents/constant.MY_TYPE.html '; //'
|
||||
pub const MY_TYPE: MyType = MyType(42);
|
||||
|
||||
pub struct MyTypeWithStr(&'static str);
|
||||
|
||||
// @!has show_const_contents/constant.MY_TYPE_WITH_STR.html '= MyTypeWithStr("show this");'
|
||||
// @!has show_const_contents/constant.MY_TYPE_WITH_STR.html '; //'
|
||||
// @!hasraw show_const_contents/constant.MY_TYPE_WITH_STR.html '= MyTypeWithStr("show this");'
|
||||
// @!hasraw show_const_contents/constant.MY_TYPE_WITH_STR.html '; //'
|
||||
pub const MY_TYPE_WITH_STR: MyTypeWithStr = MyTypeWithStr("show this");
|
||||
|
||||
// @hasraw show_const_contents/constant.PI.html '= 3.14159265358979323846264338327950288f32;'
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#![crate_name = "foo"]
|
||||
|
||||
// @has foo/struct.Bar.html
|
||||
// @!has - '//*[@id="impl-Sized"]'
|
||||
// @!hasraw - '//*[@id="impl-Sized"]'
|
||||
pub struct Bar {
|
||||
a: u16,
|
||||
}
|
||||
|
||||
// @has foo/struct.Foo.html
|
||||
// @!has - '//*[@id="impl-Sized"]'
|
||||
// @!hasraw - '//*[@id="impl-Sized"]'
|
||||
pub struct Foo<T: ?Sized>(T);
|
||||
|
||||
// @has foo/struct.Unsized.html
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
// @has static_root_path/struct.SomeStruct.html
|
||||
// @matchesraw - '"/cache/main\.js"'
|
||||
// @!matches - '"\.\./main\.js"'
|
||||
// @!matchesraw - '"\.\./main\.js"'
|
||||
// @matchesraw - 'data-root-path="\.\./"'
|
||||
// @!matches - '"/cache/search-index\.js"'
|
||||
// @!matchesraw - '"/cache/search-index\.js"'
|
||||
pub struct SomeStruct;
|
||||
|
||||
// @has src/static_root_path/static-root-path.rs.html
|
||||
// @matchesraw - '"/cache/source-script\.js"'
|
||||
// @!matches - '"\.\./\.\./source-script\.js"'
|
||||
// @!matchesraw - '"\.\./\.\./source-script\.js"'
|
||||
// @matchesraw - '"\.\./\.\./source-files.js"'
|
||||
// @!matches - '"/cache/source-files\.js"'
|
||||
// @!matchesraw - '"/cache/source-files\.js"'
|
||||
|
||||
// @has settings.html
|
||||
// @matchesraw - '/cache/settings\.js'
|
||||
// @!matches - '\./settings\.js'
|
||||
// @!matchesraw - '\./settings\.js'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// @has foo/struct.Foo.html
|
||||
// @count - '//*[@class="docblock"]/div/table' 2
|
||||
// @!has - '//*[@class="docblock"]/table'
|
||||
// @!hasraw - '//*[@class="docblock"]/table'
|
||||
/// | hello | hello2 |
|
||||
/// | ----- | ------ |
|
||||
/// | data | data2 |
|
||||
|
|
|
@ -62,7 +62,7 @@ pub struct PrivStruct {
|
|||
}
|
||||
|
||||
// @has 'toggle_item_contents/enum.Enum.html'
|
||||
// @!has - '//details[@class="rustdoc-toggle type-contents-toggle"]'
|
||||
// @!hasraw - '//details[@class="rustdoc-toggle type-contents-toggle"]'
|
||||
pub enum Enum {
|
||||
A, B, C,
|
||||
D {
|
||||
|
@ -72,7 +72,7 @@ pub enum Enum {
|
|||
}
|
||||
|
||||
// @has 'toggle_item_contents/enum.EnumStructVariant.html'
|
||||
// @!has - '//details[@class="rustdoc-toggle type-contents-toggle"]'
|
||||
// @!hasraw - '//details[@class="rustdoc-toggle type-contents-toggle"]'
|
||||
pub enum EnumStructVariant {
|
||||
A, B, C,
|
||||
D {
|
||||
|
|
|
@ -59,7 +59,7 @@ pub struct MyStruct;
|
|||
|
||||
// We check that associated items with default values aren't generated in the implementors list.
|
||||
impl MyTrait for (u8, u8) {
|
||||
// @!has trait_impl_items_links_and_anchors/trait.MyTrait.html '//div[@id="associatedconstant.VALUE-4"]'
|
||||
// @!hasraw trait_impl_items_links_and_anchors/trait.MyTrait.html '//div[@id="associatedconstant.VALUE-4"]'
|
||||
type Assoc = bool;
|
||||
fn trait_function(&self) {}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ impl Trait for Struct {
|
|||
fn c() {}
|
||||
|
||||
// @has - '//*[@id="method.d"]/../../div[@class="docblock"]/p' 'Escaped formatting a*b*c* works'
|
||||
// @!has - '//*[@id="method.d"]/../../div[@class="docblock"]/p/em'
|
||||
// @!hasraw - '//*[@id="method.d"]/../../div[@class="docblock"]/p/em'
|
||||
fn d() {}
|
||||
|
||||
// @has - '//*[@id="impl-Trait-for-Struct"]/h3//a/@href' 'trait.Trait.html'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// @has - '//h3[@class="sidebar-title"]/a[@href="#fields"]' 'Tuple Fields'
|
||||
// @has - '//*[@id="structfield.0"]' '0: u32'
|
||||
// @has - '//*[@id="main-content"]/div[@class="docblock"]' 'hello'
|
||||
// @!has - '//*[@id="structfield.1"]'
|
||||
// @!hasraw - '//*[@id="structfield.1"]'
|
||||
// @has - '//*[@id="structfield.2"]' '2: char'
|
||||
// @has - '//*[@id="structfield.3"]' '3: i8'
|
||||
// @has - '//*[@id="main-content"]/div[@class="docblock"]' 'not hello'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Tests that `--show-type-layout` is required in order to show layout info.
|
||||
|
||||
// @!has type_layout_flag_required/struct.Foo.html 'Size: '
|
||||
// @!hasraw type_layout_flag_required/struct.Foo.html 'Size: '
|
||||
pub struct Foo(usize);
|
||||
|
|
|
@ -29,7 +29,7 @@ pub struct X(usize);
|
|||
|
||||
// @hasraw type_layout/struct.Y.html 'Size: '
|
||||
// @hasraw - '1 byte'
|
||||
// @!has - ' bytes'
|
||||
// @!hasraw - ' bytes'
|
||||
pub struct Y(u8);
|
||||
|
||||
// @hasraw type_layout/struct.Z.html 'Size: '
|
||||
|
@ -38,7 +38,7 @@ pub struct Z;
|
|||
|
||||
// We can't compute layout for generic types.
|
||||
// @hasraw type_layout/struct.Generic.html 'Unable to compute type layout, possibly due to this type having generic parameters'
|
||||
// @!has - 'Size: '
|
||||
// @!hasraw - 'Size: '
|
||||
pub struct Generic<T>(T);
|
||||
|
||||
// We *can*, however, compute layout for types that are only generic over lifetimes,
|
||||
|
@ -63,7 +63,7 @@ pub type GenericTypeAlias = (Generic<(u32, ())>, Generic<u32>);
|
|||
// @hasraw type_layout/type.Edges.html 'Encountered an error during type layout; the type failed to be normalized.'
|
||||
pub type Edges<'a, E> = std::borrow::Cow<'a, [E]>;
|
||||
|
||||
// @!has type_layout/trait.MyTrait.html 'Size: '
|
||||
// @!hasraw type_layout/trait.MyTrait.html 'Size: '
|
||||
pub trait MyTrait {}
|
||||
|
||||
// @hasraw type_layout/enum.Variants.html 'Size: '
|
||||
|
|
Loading…
Add table
Reference in a new issue