Skip to content

Commit a333572

Browse files
Update rustdoc tests for stability display
1 parent 00779af commit a333572

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tests/rustdoc/const-display.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ impl Foo {
7272
pub struct Bar;
7373

7474
impl Bar {
75-
// Do not show non-const stabilities that are the same as the enclosing item.
76-
// @matches 'foo/struct.Bar.html' '//span[@class="since"]' '^const: 1.2.0$'
75+
// Show non-const stabilities that are the same as the enclosing item.
76+
// @has 'foo/struct.Bar.html' '//span[@class="since"]' '1.0.0 (const: 1.2.0)'
7777
#[stable(feature = "rust1", since = "1.0.0")]
7878
#[rustc_const_stable(feature = "const2", since = "1.2.0")]
7979
pub const fn stable_impl() -> u32 { 42 }

tests/rustdoc/deref/deref-const-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct Foo {
2626

2727
// @has 'foo/struct.Foo.html'
2828
// @has - '//*[@id="method.len"]' 'pub fn len(&self) -> usize'
29-
// @!has - '//*[@id="method.len"]//span[@class="since"]' '1.0.0'
29+
// @has - '//*[@id="method.len"]//span[@class="since"]' '1.0.0'
3030
// @!has - '//*[@id="method.len"]//span[@class="since"]' '(const: 1.0.0)'
3131
#[stable(feature = "rust1", since = "1.0.0")]
3232
impl std::ops::Deref for Foo {

tests/rustdoc/ensure-src-link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
// This test ensures that the [src] link is present on traits items.
44

5-
// @has foo/trait.Iterator.html '//*[@id="method.zip"]//a[@class="src rightside"]' "source"
5+
// @has foo/trait.Iterator.html '//*[@id="method.zip"]//a[@class="src"]' "source"
66
pub use std::iter::Iterator;

tests/rustdoc/implementor-stable-version.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ pub struct Foo;
1616
#[stable(feature = "foobar", since = "4.4.4")]
1717
impl Bar for Foo {}
1818

19-
// @!has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' '3.3.3'
19+
// @has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' '3.3.3'
2020
#[stable(feature = "foobaz", since = "3.3.3")]
2121
impl Baz for Foo {}

0 commit comments

Comments
 (0)