Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: remove unused class has-srclink #107432

Merged
merged 1 commit into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1528,11 +1528,7 @@ fn render_impl(
})
})
.map(|item| format!("{}.{}", item.type_(), name));
write!(
w,
"<section id=\"{}\" class=\"{}{} has-srclink\">",
id, item_type, in_trait_class,
);
write!(w, "<section id=\"{}\" class=\"{}{}\">", id, item_type, in_trait_class,);
render_rightside(w, cx, item, containing_item, render_mode);
if trait_.is_some() {
// Anchors are only used on trait impls.
Expand All @@ -1554,11 +1550,7 @@ fn render_impl(
kind @ (clean::TyAssocConstItem(ty) | clean::AssocConstItem(ty, _)) => {
let source_id = format!("{}.{}", item_type, name);
let id = cx.derive_id(source_id.clone());
write!(
w,
"<section id=\"{}\" class=\"{}{} has-srclink\">",
id, item_type, in_trait_class
);
write!(w, "<section id=\"{}\" class=\"{}{}\">", id, item_type, in_trait_class);
render_rightside(w, cx, item, containing_item, render_mode);
if trait_.is_some() {
// Anchors are only used on trait impls.
Expand Down Expand Up @@ -1606,11 +1598,7 @@ fn render_impl(
clean::AssocTypeItem(tydef, _bounds) => {
let source_id = format!("{}.{}", item_type, name);
let id = cx.derive_id(source_id.clone());
write!(
w,
"<section id=\"{}\" class=\"{}{} has-srclink\">",
id, item_type, in_trait_class
);
write!(w, "<section id=\"{}\" class=\"{}{}\">", id, item_type, in_trait_class);
if trait_.is_some() {
// Anchors are only used on trait impls.
write!(w, "<a href=\"#{}\" class=\"anchor\">§</a>", id);
Expand Down Expand Up @@ -1844,7 +1832,7 @@ pub(crate) fn render_impl_summary(
} else {
format!(" data-aliases=\"{}\"", aliases.join(","))
};
write!(w, "<section id=\"{}\" class=\"impl has-srclink\"{}>", id, aliases);
write!(w, "<section id=\"{}\" class=\"impl\"{}>", id, aliases);
render_rightside(w, cx, &i.impl_item, containing_item, RenderMode::Normal);
write!(w, "<a href=\"#{}\" class=\"anchor\">§</a>", id);
write!(w, "<h3 class=\"code-header\">");
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
let method_toggle_class = if item_type.is_method() { " method-toggle" } else { "" };
write!(w, "<details class=\"toggle{method_toggle_class}\" open><summary>");
}
write!(w, "<section id=\"{}\" class=\"method has-srclink\">", id);
write!(w, "<section id=\"{}\" class=\"method\">", id);
render_rightside(w, cx, m, t, RenderMode::Normal);
write!(w, "<h4 class=\"code-header\">");
render_assoc_item(
Expand Down
10 changes: 5 additions & 5 deletions tests/rustdoc-gui/src-font-size.goml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
show-text: true
// Check the impl headers.
assert-css: (".impl.has-srclink .srclink", {"font-size": "16px", "font-weight": 400}, ALL)
assert-css: (".impl.has-srclink .code-header", {"font-size": "18px", "font-weight": 600}, ALL)
assert-css: (".impl .srclink", {"font-size": "16px", "font-weight": 400}, ALL)
assert-css: (".impl .code-header", {"font-size": "18px", "font-weight": 600}, ALL)
// Check the impl items.
assert-css: (".impl-items .has-srclink .srclink", {"font-size": "16px", "font-weight": 400}, ALL)
assert-css: (".impl-items .has-srclink .code-header", {"font-size": "16px", "font-weight": 600}, ALL)
assert-css: (".impl-items .srclink", {"font-size": "16px", "font-weight": 400}, ALL)
assert-css: (".impl-items .code-header", {"font-size": "16px", "font-weight": 600}, ALL)

// Check that we can click on source link
store-document-property: (url, "URL")
click: ".impl-items .has-srclink .srclink"
click: ".impl-items .srclink"
assert-document-property-false: {"URL": |url|}
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_const_anchor.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="associatedconstant.YOLO" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#16">source</a><h4 class="code-header">const <a href="#associatedconstant.YOLO" class="constant">YOLO</a>: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
<section id="associatedconstant.YOLO" class="method"><a class="srclink rightside" href="../src/foo/anchors.rs.html#16">source</a><h4 class="code-header">const <a href="#associatedconstant.YOLO" class="constant">YOLO</a>: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_const_anchor2.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="associatedconstant.X" class="associatedconstant has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#42">source</a><h4 class="code-header">pub const <a href="#associatedconstant.X" class="constant">X</a>: <a class="primitive" href="{{channel}}/std/primitive.i32.html">i32</a> = 0i32</h4></section>
<section id="associatedconstant.X" class="associatedconstant"><a class="srclink rightside" href="../src/foo/anchors.rs.html#42">source</a><h4 class="code-header">pub const <a href="#associatedconstant.X" class="constant">X</a>: <a class="primitive" href="{{channel}}/std/primitive.i32.html">i32</a> = 0i32</h4></section>
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_method_anchor.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="method.new" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#48">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; Self</h4></section>
<section id="method.new" class="method"><a class="srclink rightside" href="../src/foo/anchors.rs.html#48">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -&gt; Self</h4></section>
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_trait_method_anchor.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="method.bar" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#23">source</a><h4 class="code-header">fn <a href="#method.bar" class="fn">bar</a>()</h4></section>
<section id="method.bar" class="method"><a class="srclink rightside" href="../src/foo/anchors.rs.html#23">source</a><h4 class="code-header">fn <a href="#method.bar" class="fn">bar</a>()</h4></section>
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_tymethod_anchor.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="tymethod.foo" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#20">source</a><h4 class="code-header">fn <a href="#tymethod.foo" class="fn">foo</a>()</h4></section>
<section id="tymethod.foo" class="method"><a class="srclink rightside" href="../src/foo/anchors.rs.html#20">source</a><h4 class="code-header">fn <a href="#tymethod.foo" class="fn">foo</a>()</h4></section>
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_type_anchor.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="associatedtype.T" class="method has-srclink"><a class="srclink rightside" href="../src/foo/anchors.rs.html#13">source</a><h4 class="code-header">type <a href="#associatedtype.T" class="associatedtype">T</a></h4></section>
<section id="associatedtype.T" class="method"><a class="srclink rightside" href="../src/foo/anchors.rs.html#13">source</a><h4 class="code-header">type <a href="#associatedtype.T" class="associatedtype">T</a></h4></section>
2 changes: 1 addition & 1 deletion tests/rustdoc/anchors.no_type_anchor2.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<section id="associatedtype.Y" class="associatedtype has-srclink"><h4 class="code-header">type <a href="#associatedtype.Y" class="associatedtype">Y</a> = <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
<section id="associatedtype.Y" class="associatedtype"><h4 class="code-header">type <a href="#associatedtype.Y" class="associatedtype">Y</a> = <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a></h4></section>
6 changes: 3 additions & 3 deletions tests/rustdoc/async-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ struct AsyncFdReadyGuard<'a, T> { x: &'a T }

impl Foo {
// @has async_fn/struct.Foo.html
// @has - '//*[@class="method has-srclink"]' 'pub async fn complicated_lifetimes( &self, context: &impl Bar) -> impl Iterator<Item = &usize>'
// @has - '//*[@class="method"]' 'pub async fn complicated_lifetimes( &self, context: &impl Bar) -> impl Iterator<Item = &usize>'
pub async fn complicated_lifetimes(&self, context: &impl Bar) -> impl Iterator<Item = &usize> {}
// taken from `tokio` as an example of a method that was particularly bad before
// @has - '//*[@class="method has-srclink"]' "pub async fn readable<T>(&self) -> Result<AsyncFdReadyGuard<'_, T>, ()>"
// @has - '//*[@class="method"]' "pub async fn readable<T>(&self) -> Result<AsyncFdReadyGuard<'_, T>, ()>"
pub async fn readable<T>(&self) -> Result<AsyncFdReadyGuard<'_, T>, ()> {}
// @has - '//*[@class="method has-srclink"]' "pub async fn mut_self(&mut self)"
// @has - '//*[@class="method"]' "pub async fn mut_self(&mut self)"
pub async fn mut_self(&mut self) {}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/const-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub const fn bar() -> usize {
}

// @has foo/struct.Foo.html
// @has - '//*[@class="method has-srclink"]' 'const fn new()'
// @has - '//*[@class="method"]' 'const fn new()'
pub struct Foo(usize);

impl Foo {
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/const-generics/const-generic-slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub trait Array {
}

// @has foo/trait.Array.html
// @has - '//*[@class="impl has-srclink"]' 'impl<T, const N: usize> Array for [T; N]'
// @has - '//*[@class="impl"]' 'impl<T, const N: usize> Array for [T; N]'
impl<T, const N: usize> Array for [T; N] {
type Item = T;
}
2 changes: 1 addition & 1 deletion tests/rustdoc/doc-assoc-item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub trait Bar {
fn foo(foo: Self::Fuu);
}

// @has doc_assoc_item/struct.Foo.html '//*[@class="impl has-srclink"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
// @has doc_assoc_item/struct.Foo.html '//*[@class="impl"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
impl<T: Bar<Fuu = u32>> Foo<T> {
pub fn new(t: T) -> Foo<T> {
Foo {
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc/duplicate_impls/issue-33054.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// @has issue_33054/impls/struct.Foo.html
// @has - '//h3[@class="code-header"]' 'impl Foo'
// @has - '//h3[@class="code-header"]' 'impl Bar for Foo'
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @count - '//*[@id="main-content"]/div[@id="implementations-list"]/details/summary/*[@class="impl has-srclink"]' 1
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
// @count - '//*[@id="main-content"]/div[@id="implementations-list"]/details/summary/*[@class="impl"]' 1
// @has issue_33054/impls/bar/trait.Bar.html
// @has - '//h3[@class="code-header"]' 'impl Bar for Foo'
// @count - '//*[@class="struct"]' 1
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/duplicated_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// blanket implementations.

// @has 'foo/struct.Whatever.html'
// @count - '//*[@id="blanket-implementations-list"]/section[@class="impl has-srclink"]' 1
// @count - '//*[@id="blanket-implementations-list"]/section[@class="impl"]' 1

pub trait Something<T> { }
pub struct Whatever;
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/empty-impl-block-private-with-doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Foo;
// There are 3 impl blocks with public item and one that should not be displayed
// by default because it only contains private items (but not in this case because
// we used `--document-private-items`).
// @count - '//*[@class="impl has-srclink"]' 'impl Foo' 4
// @count - '//*[@class="impl"]' 'impl Foo' 4

// Impl block only containing private items should not be displayed unless the
// `--document-private-items` flag is used.
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/empty-impl-block-private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct Foo;

// There are 3 impl blocks with public item and one that should not be displayed
// because it only contains private items.
// @count - '//*[@class="impl has-srclink"]' 'impl Foo' 3
// @count - '//*[@class="impl"]' 'impl Foo' 3

// Impl block only containing private items should not be displayed.
/// Private
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/empty-impl-block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub struct Foo;
/// Hello empty impl block!
impl Foo {}
// We ensure that this empty impl block without doc isn't rendered.
// @count - '//*[@class="impl has-srclink"]' 'impl Foo' 1
// @count - '//*[@class="impl"]' 'impl Foo' 1
impl Foo {}

// Just to ensure that empty trait impl blocks are rendered.
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/impl-parts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub auto trait AnAutoTrait {}

pub struct Foo<T> { field: T }

// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//h3[@class="code-header"]' \
// @has impl_parts/struct.Foo.html '//*[@class="impl"]//h3[@class="code-header"]' \
// "impl<T> !AnAutoTrait for Foo<T>where T: Sync + Clone,"
// @has impl_parts/trait.AnAutoTrait.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \
// "impl<T> !AnAutoTrait for Foo<T>where T: Sync + Clone,"
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc/inline_cross/issue-31948-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
extern crate rustdoc_nonreachable_impls;

// @has issue_31948_1/struct.Wobble.html
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Bark for'
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Woof for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for'
// @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for'
// @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for'
pub use rustdoc_nonreachable_impls::hidden::Wobble;
Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc/inline_cross/issue-31948-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
extern crate rustdoc_nonreachable_impls;

// @has issue_31948_2/struct.Wobble.html
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Qux for'
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Bark for'
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Woof for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for'
// @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for'
pub use rustdoc_nonreachable_impls::hidden::Wobble;

Expand Down
6 changes: 3 additions & 3 deletions tests/rustdoc/inline_cross/issue-31948.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
extern crate rustdoc_nonreachable_impls;

// @has issue_31948/struct.Foo.html
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Bark for'
// @has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Woof for'
// @!has - '//*[@class="impl has-srclink"]//h3[@class="code-header"]' 'Bar for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for'
// @has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for'
// @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for'
// @!has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for'
pub use rustdoc_nonreachable_impls::Foo;

Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc/issue-21474.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ mod inner {
pub trait Blah { }

// @count issue_21474/struct.What.html \
// '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
pub struct What;
6 changes: 3 additions & 3 deletions tests/rustdoc/issue-33302.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ macro_rules! make {
}

// @has issue_33302/struct.S.html \
// '//*[@class="impl has-srclink"]' 'impl T<[i32; 16]> for S'
// '//*[@class="impl"]' 'impl T<[i32; 16]> for S'
// @has - '//*[@id="associatedconstant.C"]' 'const C: [i32; 16]'
// @has - '//*[@id="associatedconstant.D"]' 'const D: i32'
impl T<[i32; ($n * $n)]> for S {
const C: [i32; ($n * $n)] = [0; ($n * $n)];
}

// @has issue_33302/struct.S.html \
// '//*[@class="impl has-srclink"]' 'impl T<[i32; 16]> for S'
// '//*[@class="impl"]' 'impl T<[i32; 16]> for S'
// @has - '//*[@id="associatedconstant.C-1"]' 'const C: (i32,)'
// @has - '//*[@id="associatedconstant.D-1"]' 'const D: i32'
impl T<(i32,)> for S {
const C: (i32,) = ($n,);
}

// @has issue_33302/struct.S.html \
// '//*[@class="impl has-srclink"]' 'impl T<(i32, i32)> for S'
// '//*[@class="impl"]' 'impl T<(i32, i32)> for S'
// @has - '//*[@id="associatedconstant.C-2"]' 'const C: (i32, i32)'
// @has - '//*[@id="associatedconstant.D-2"]' 'const D: i32'
impl T<(i32, i32)> for S {
Expand Down
8 changes: 4 additions & 4 deletions tests/rustdoc/issue-45584.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ pub trait Bar<T, U> {}

// @has 'foo/struct.Foo1.html'
pub struct Foo1;
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @has - '//*[@class="impl has-srclink"]' "impl Bar<Foo1, &'static Foo1> for Foo1"
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
// @has - '//*[@class="impl"]' "impl Bar<Foo1, &'static Foo1> for Foo1"
impl Bar<Foo1, &'static Foo1> for Foo1 {}

// @has 'foo/struct.Foo2.html'
pub struct Foo2;
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @has - '//*[@class="impl has-srclink"]' "impl Bar<&'static Foo2, Foo2> for u8"
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
// @has - '//*[@class="impl"]' "impl Bar<&'static Foo2, Foo2> for u8"
impl Bar<&'static Foo2, Foo2> for u8 {}
2 changes: 1 addition & 1 deletion tests/rustdoc/issue-50159.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl<B, C> Signal2 for B where B: Signal<Item = C> {
// @has - '//h3[@class="code-header"]' 'impl<B> Send for Switch<B>where <B as Signal>::Item: Send'
// @has - '//h3[@class="code-header"]' 'impl<B> Sync for Switch<B>where <B as Signal>::Item: Sync'
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
pub struct Switch<B: Signal> {
pub inner: <B as Signal2>::Item2,
}
2 changes: 1 addition & 1 deletion tests/rustdoc/issue-51236.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub mod traits {
}

// @has issue_51236/struct.Owned.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
// "impl<T> Send for Owned<T>where <T as Owned<'static>>::Reader: Send"
pub struct Owned<T> where T: for<'a> ::traits::Owned<'a> {
marker: PhantomData<<T as ::traits::Owned<'static>>::Reader>,
Expand Down
10 changes: 5 additions & 5 deletions tests/rustdoc/issue-53812.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ macro_rules! array_impls {
}

// @has issue_53812/trait.MyIterator.html
// @has - '//*[@id="implementors-list"]/*[@class="impl has-srclink"][1]' 'MyStruct<[T; 0]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl has-srclink"][2]' 'MyStruct<[T; 1]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl has-srclink"][3]' 'MyStruct<[T; 2]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl has-srclink"][4]' 'MyStruct<[T; 3]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl has-srclink"][5]' 'MyStruct<[T; 10]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl"][1]' 'MyStruct<[T; 0]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl"][2]' 'MyStruct<[T; 1]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl"][3]' 'MyStruct<[T; 2]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl"][4]' 'MyStruct<[T; 3]>'
// @has - '//*[@id="implementors-list"]/*[@class="impl"][5]' 'MyStruct<[T; 10]>'
array_impls! { 10 3 2 1 0 }
4 changes: 2 additions & 2 deletions tests/rustdoc/issue-54705.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pub trait ScopeHandle<'scope> {}

// @has issue_54705/struct.ScopeFutureContents.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
// "impl<'scope, S> Send for ScopeFutureContents<'scope, S>where S: Sync"
//
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
// "impl<'scope, S> Sync for ScopeFutureContents<'scope, S>where S: Sync"
pub struct ScopeFutureContents<'scope, S>
where S: ScopeHandle<'scope>,
Expand Down
Loading