Update rustdoc tests for stability display
This commit is contained in:
parent
00779af94e
commit
a333572970
@ -72,8 +72,8 @@ impl Foo {
|
|||||||
pub struct Bar;
|
pub struct Bar;
|
||||||
|
|
||||||
impl Bar {
|
impl Bar {
|
||||||
// Do not show non-const stabilities that are the same as the enclosing item.
|
// Show non-const stabilities that are the same as the enclosing item.
|
||||||
// @matches 'foo/struct.Bar.html' '//span[@class="since"]' '^const: 1.2.0$'
|
// @has 'foo/struct.Bar.html' '//span[@class="since"]' '1.0.0 (const: 1.2.0)'
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_const_stable(feature = "const2", since = "1.2.0")]
|
#[rustc_const_stable(feature = "const2", since = "1.2.0")]
|
||||||
pub const fn stable_impl() -> u32 { 42 }
|
pub const fn stable_impl() -> u32 { 42 }
|
||||||
|
@ -26,7 +26,7 @@ pub struct Foo {
|
|||||||
|
|
||||||
// @has 'foo/struct.Foo.html'
|
// @has 'foo/struct.Foo.html'
|
||||||
// @has - '//*[@id="method.len"]' 'pub fn len(&self) -> usize'
|
// @has - '//*[@id="method.len"]' 'pub fn len(&self) -> usize'
|
||||||
// @!has - '//*[@id="method.len"]//span[@class="since"]' '1.0.0'
|
// @has - '//*[@id="method.len"]//span[@class="since"]' '1.0.0'
|
||||||
// @!has - '//*[@id="method.len"]//span[@class="since"]' '(const: 1.0.0)'
|
// @!has - '//*[@id="method.len"]//span[@class="since"]' '(const: 1.0.0)'
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl std::ops::Deref for Foo {
|
impl std::ops::Deref for Foo {
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
// This test ensures that the [src] link is present on traits items.
|
// This test ensures that the [src] link is present on traits items.
|
||||||
|
|
||||||
// @has foo/trait.Iterator.html '//*[@id="method.zip"]//a[@class="src rightside"]' "source"
|
// @has foo/trait.Iterator.html '//*[@id="method.zip"]//a[@class="src"]' "source"
|
||||||
pub use std::iter::Iterator;
|
pub use std::iter::Iterator;
|
||||||
|
@ -16,6 +16,6 @@ pub struct Foo;
|
|||||||
#[stable(feature = "foobar", since = "4.4.4")]
|
#[stable(feature = "foobar", since = "4.4.4")]
|
||||||
impl Bar for Foo {}
|
impl Bar for Foo {}
|
||||||
|
|
||||||
// @!has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' '3.3.3'
|
// @has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' '3.3.3'
|
||||||
#[stable(feature = "foobaz", since = "3.3.3")]
|
#[stable(feature = "foobaz", since = "3.3.3")]
|
||||||
impl Baz for Foo {}
|
impl Baz for Foo {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user