Update rustdoc tests for stability display
This commit is contained in:
parent
00779af94e
commit
a333572970
@ -72,8 +72,8 @@ pub const fn stable_impl() -> u32 { 42 }
|
||||
pub struct Bar;
|
||||
|
||||
impl Bar {
|
||||
// Do not show non-const stabilities that are the same as the enclosing item.
|
||||
// @matches 'foo/struct.Bar.html' '//span[@class="since"]' '^const: 1.2.0$'
|
||||
// Show non-const stabilities that are the same as the enclosing item.
|
||||
// @has 'foo/struct.Bar.html' '//span[@class="since"]' '1.0.0 (const: 1.2.0)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "const2", since = "1.2.0")]
|
||||
pub const fn stable_impl() -> u32 { 42 }
|
||||
|
@ -26,7 +26,7 @@ pub struct Foo {
|
||||
|
||||
// @has 'foo/struct.Foo.html'
|
||||
// @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)'
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl std::ops::Deref for Foo {
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
// 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;
|
||||
|
@ -16,6 +16,6 @@ pub trait Baz {}
|
||||
#[stable(feature = "foobar", since = "4.4.4")]
|
||||
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")]
|
||||
impl Baz for Foo {}
|
||||
|
Loading…
Reference in New Issue
Block a user