Update rustdoc tests for stability display · rust-lang/rust@a333572 (original) (raw)

4 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -72,8 +72,8 @@ impl Foo {
72 72 pub struct Bar;
73 73
74 74 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)'
77 77 #[stable(feature = "rust1", since = "1.0.0")]
78 78 #[rustc_const_stable(feature = "const2", since = "1.2.0")]
79 79 pub const fn stable_impl() -> u32 { 42 }
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ pub struct Foo {
26 26
27 27 // @has 'foo/struct.Foo.html'
28 28 // @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'
30 30 // @!has - '//*[@id="method.len"]//span[@class="since"]' '(const: 1.0.0)'
31 31 #[stable(feature = "rust1", since = "1.0.0")]
32 32 impl std::ops::Deref for Foo {
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@
2 2
3 3 // This test ensures that the [src] link is present on traits items.
4 4
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"
6 6 pub use std::iter::Iterator;
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@ pub struct Foo;
16 16 #[stable(feature = "foobar", since = "4.4.4")]
17 17 impl Bar for Foo {}
18 18
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'
20 20 #[stable(feature = "foobaz", since = "3.3.3")]
21 21 impl Baz for Foo {}