Skip to content

Commit 14fe83f

Browse files
Update rustdoc tests
1 parent fab6814 commit 14fe83f

36 files changed

+100
-94
lines changed

src/test/rustdoc/async-fn.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ struct AsyncFdReadyGuard<'a, T> { x: &'a T }
7777

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

src/test/rustdoc/const-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub const fn bar() -> usize {
88
}
99

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

1414
impl Foo {

src/test/rustdoc/const-generics/const-generic-slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub trait Array {
66
}
77

88
// @has foo/trait.Array.html
9-
// @has - '//div[@class="impl"]' 'impl<T, const N: usize> Array for [T; N]'
9+
// @has - '//div[@class="impl has-srclink"]' 'impl<T, const N: usize> Array for [T; N]'
1010
impl <T, const N: usize> Array for [T; N] {
1111
type Item = T;
1212
}

src/test/rustdoc/doc-assoc-item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub trait Bar {
88
fn foo(foo: Self::Fuu);
99
}
1010

11-
// @has doc_assoc_item/struct.Foo.html '//*[@class="impl"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
11+
// @has doc_assoc_item/struct.Foo.html '//*[@class="impl has-srclink"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
1212
impl<T: Bar<Fuu = u32>> Foo<T> {
1313
pub fn new(t: T) -> Foo<T> {
1414
Foo {

src/test/rustdoc/duplicate_impls/issue-33054.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @has issue_33054/impls/struct.Foo.html
22
// @has - '//code' 'impl Foo'
33
// @has - '//code' 'impl Bar for Foo'
4-
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
5-
// @count - '//*[@id="main"]/details/summary/*[@class="impl"]' 1
4+
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
5+
// @count - '//*[@id="main"]/details/summary/*[@class="impl has-srclink"]' 1
66
// @has issue_33054/impls/bar/trait.Bar.html
77
// @has - '//code' 'impl Bar for Foo'
88
// @count - '//*[@class="struct"]' 1

src/test/rustdoc/impl-parts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub auto trait AnAutoTrait {}
55

66
pub struct Foo<T> { field: T }
77

8-
// @has impl_parts/struct.Foo.html '//*[@class="impl"]//code' \
8+
// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//code' \
99
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
1010
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//code' \
1111
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"

src/test/rustdoc/inline_cross/issue-31948-1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
extern crate rustdoc_nonreachable_impls;
66

77
// @has issue_31948_1/struct.Wobble.html
8-
// @has - '//*[@class="impl"]//code' 'Bark for'
9-
// @has - '//*[@class="impl"]//code' 'Woof for'
8+
// @has - '//*[@class="impl has-srclink"]//code' 'Bark for'
9+
// @has - '//*[@class="impl has-srclink"]//code' 'Woof for'
1010
// @!has - '//*[@class="impl"]//code' 'Bar for'
1111
// @!has - '//*[@class="impl"]//code' 'Qux for'
1212
pub use rustdoc_nonreachable_impls::hidden::Wobble;

src/test/rustdoc/inline_cross/issue-31948-2.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
extern crate rustdoc_nonreachable_impls;
66

77
// @has issue_31948_2/struct.Wobble.html
8-
// @has - '//*[@class="impl"]//code' 'Qux for'
9-
// @has - '//*[@class="impl"]//code' 'Bark for'
10-
// @has - '//*[@class="impl"]//code' 'Woof for'
8+
// @has - '//*[@class="impl has-srclink"]//code' 'Qux for'
9+
// @has - '//*[@class="impl has-srclink"]//code' 'Bark for'
10+
// @has - '//*[@class="impl has-srclink"]//code' 'Woof for'
1111
// @!has - '//*[@class="impl"]//code' 'Bar for'
1212
pub use rustdoc_nonreachable_impls::hidden::Wobble;
1313

src/test/rustdoc/inline_cross/issue-31948.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
extern crate rustdoc_nonreachable_impls;
66

77
// @has issue_31948/struct.Foo.html
8-
// @has - '//*[@class="impl"]//code' 'Bark for'
9-
// @has - '//*[@class="impl"]//code' 'Woof for'
10-
// @!has - '//*[@class="impl"]//code' 'Bar for'
8+
// @has - '//*[@class="impl has-srclink"]//code' 'Bark for'
9+
// @has - '//*[@class="impl has-srclink"]//code' 'Woof for'
10+
// @!has - '//*[@class="impl has-srclink"]//code' 'Bar for'
1111
// @!has - '//*[@class="impl"]//code' 'Qux for'
1212
pub use rustdoc_nonreachable_impls::Foo;
1313

src/test/rustdoc/issue-21474.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ mod inner {
77
pub trait Blah { }
88

99
// @count issue_21474/struct.What.html \
10-
// '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
10+
// '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
1111
pub struct What;

src/test/rustdoc/issue-33302.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ macro_rules! make {
2323
}
2424

2525
// @has issue_33302/struct.S.html \
26-
// '//div[@class="impl"]' 'impl T<[i32; 16]> for S'
26+
// '//div[@class="impl has-srclink"]' 'impl T<[i32; 16]> for S'
2727
// @has - '//*[@id="associatedconstant.C"]' 'const C: [i32; 16]'
2828
// @has - '//*[@id="associatedconstant.D"]' 'const D: i32'
2929
impl T<[i32; ($n * $n)]> for S {
3030
const C: [i32; ($n * $n)] = [0; ($n * $n)];
3131
}
3232

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

4141
// @has issue_33302/struct.S.html \
42-
// '//div[@class="impl"]' 'impl T<(i32, i32)> for S'
42+
// '//div[@class="impl has-srclink"]' 'impl T<(i32, i32)> for S'
4343
// @has - '//*[@id="associatedconstant.C-2"]' 'const C: (i32, i32)'
4444
// @has - '//*[@id="associatedconstant.D-2"]' 'const D: i32'
4545
impl T<(i32, i32)> for S {

src/test/rustdoc/issue-45584.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ pub trait Bar<T, U> {}
44

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

1111
// @has 'foo/struct.Foo2.html'
1212
pub struct Foo2;
13-
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
14-
// @has - '//*[@class="impl"]' "impl Bar<&'static Foo2, Foo2> for u8"
13+
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
14+
// @has - '//*[@class="impl has-srclink"]' "impl Bar<&'static Foo2, Foo2> for u8"
1515
impl Bar<&'static Foo2, Foo2> for u8 {}

src/test/rustdoc/issue-50159.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl<B, C> Signal2 for B where B: Signal<Item = C> {
1414
// @has - '//code' 'impl<B> Send for Switch<B> where <B as Signal>::Item: Send'
1515
// @has - '//code' 'impl<B> Sync for Switch<B> where <B as Signal>::Item: Sync'
1616
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
17-
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
17+
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
1818
pub struct Switch<B: Signal> {
1919
pub inner: <B as Signal2>::Item2,
2020
}

src/test/rustdoc/issue-51236.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ pub mod traits {
77
}
88

99
// @has issue_51236/struct.Owned.html
10-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> Send for \
11-
// Owned<T> where <T as Owned<'static>>::Reader: Send"
10+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
11+
// "impl<T> Send for Owned<T> where <T as Owned<'static>>::Reader: Send"
1212
pub struct Owned<T> where T: for<'a> ::traits::Owned<'a> {
1313
marker: PhantomData<<T as ::traits::Owned<'static>>::Reader>,
1414
}

src/test/rustdoc/issue-53812.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ macro_rules! array_impls {
1313
}
1414

1515
// @has issue_53812/trait.MyIterator.html
16-
// @has - '//*[@id="implementors-list"]/div[@class="impl"][1]' 'MyStruct<[T; 0]>'
17-
// @has - '//*[@id="implementors-list"]/div[@class="impl"][2]' 'MyStruct<[T; 1]>'
18-
// @has - '//*[@id="implementors-list"]/div[@class="impl"][3]' 'MyStruct<[T; 2]>'
19-
// @has - '//*[@id="implementors-list"]/div[@class="impl"][4]' 'MyStruct<[T; 3]>'
20-
// @has - '//*[@id="implementors-list"]/div[@class="impl"][5]' 'MyStruct<[T; 10]>'
16+
// @has - '//*[@id="implementors-list"]/div[@class="impl has-srclink"][1]' 'MyStruct<[T; 0]>'
17+
// @has - '//*[@id="implementors-list"]/div[@class="impl has-srclink"][2]' 'MyStruct<[T; 1]>'
18+
// @has - '//*[@id="implementors-list"]/div[@class="impl has-srclink"][3]' 'MyStruct<[T; 2]>'
19+
// @has - '//*[@id="implementors-list"]/div[@class="impl has-srclink"][4]' 'MyStruct<[T; 3]>'
20+
// @has - '//*[@id="implementors-list"]/div[@class="impl has-srclink"][5]' 'MyStruct<[T; 10]>'
2121
array_impls! { 10 3 2 1 0 }

src/test/rustdoc/issue-54705.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ pub trait ScopeHandle<'scope> {}
33

44

55
// @has issue_54705/struct.ScopeFutureContents.html
6-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'scope, S> \
7-
// Send for ScopeFutureContents<'scope, S> where S: Sync"
6+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
7+
// "impl<'scope, S> Send for ScopeFutureContents<'scope, S> where S: Sync"
88
//
9-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'scope, S> \
10-
// Sync for ScopeFutureContents<'scope, S> where S: Sync"
9+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
10+
// "impl<'scope, S> Sync for ScopeFutureContents<'scope, S> where S: Sync"
1111
pub struct ScopeFutureContents<'scope, S>
1212
where S: ScopeHandle<'scope>,
1313
{

src/test/rustdoc/issue-55321.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
#![feature(negative_impls)]
22

33
// @has issue_55321/struct.A.html
4-
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//code' "impl !Send for A"
5-
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//code' "impl !Sync for A"
4+
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]//code' \
5+
// "impl !Send for A"
6+
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]//code' \
7+
// "impl !Sync for A"
68
pub struct A();
79

810
impl !Send for A {}
911
impl !Sync for A {}
1012

1113
// @has issue_55321/struct.B.html
12-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
13-
// B<T>"
14-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
15-
// B<T>"
14+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
15+
// "impl<T> !Send for B<T>"
16+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
17+
// "impl<T> !Sync for B<T>"
1618
pub struct B<T: ?Sized>(A, Box<T>);

src/test/rustdoc/issue-56822.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ impl<'a, T> MyTrait for Inner<'a, T> {
1717
}
1818

1919
// @has issue_56822/struct.Parser.html
20-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'a> Send for \
21-
// Parser<'a>"
20+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
21+
// "impl<'a> Send for Parser<'a>"
2222
pub struct Parser<'a> {
2323
field: <Wrapper<Inner<'a, u8>> as MyTrait>::Output
2424
}

src/test/rustdoc/issue-60726.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ where
2626
{}
2727

2828
// @has issue_60726/struct.IntoIter.html
29-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
30-
// IntoIter<T>"
31-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
32-
// IntoIter<T>"
29+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
30+
// "impl<T> !Send for IntoIter<T>"
31+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
32+
// "impl<T> !Sync for IntoIter<T>"
3333
pub struct IntoIter<T>{
3434
hello:DynTrait<FooInterface<T>>,
3535
}

src/test/rustdoc/issue-76501.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ pub const fn bloop() -> i32 {
88
pub struct Struct {}
99

1010
impl Struct {
11-
// @has 'issue_76501/struct.Struct.html' '//*[@class="method"]' 'pub const fn blurp() -> i32'
11+
// @has 'issue_76501/struct.Struct.html' '//*[@class="method has-srclink"]' \
12+
// 'pub const fn blurp() -> i32'
1213
/// A useless function that always returns 1.
1314
pub const fn blurp() -> i32 {
1415
1

src/test/rustdoc/issue-78673.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ pub trait AnAmazingTrait {}
77
impl<T: Something> AnAmazingTrait for T {}
88

99
// @has 'issue_78673/struct.MyStruct.html'
10-
// @has - '//*[@class="impl"]' 'AnAmazingTrait for MyStruct'
11-
// @!has - '//*[@class="impl"]' 'AnAmazingTrait for T'
10+
// @has - '//*[@class="impl has-srclink"]' 'AnAmazingTrait for MyStruct'
11+
// @!has - '//*[@class="impl has-srclink"]' 'AnAmazingTrait for T'
1212
pub struct MyStruct;
1313

1414
impl AnAmazingTrait for MyStruct {}
1515

1616
// generic structs may have _both_ specific and blanket impls that apply
1717

1818
// @has 'issue_78673/struct.AnotherStruct.html'
19-
// @has - '//*[@class="impl"]' 'AnAmazingTrait for AnotherStruct<()>'
20-
// @has - '//*[@class="impl"]' 'AnAmazingTrait for T'
19+
// @has - '//*[@class="impl has-srclink"]' 'AnAmazingTrait for AnotherStruct<()>'
20+
// @has - '//*[@class="impl has-srclink"]' 'AnAmazingTrait for T'
2121
pub struct AnotherStruct<T>(T);
2222

2323
impl<T: Something> Something for AnotherStruct<T> {}

src/test/rustdoc/mut-params.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
pub struct Foo;
77

8-
// @count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 2
8+
// @count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method has-srclink"]' 2
99
// @!has - '//*[@class="impl-items"]//*[@class="method"]' 'mut'
1010
impl Foo {
1111
pub fn foo(mut self) {}

src/test/rustdoc/negative-impl.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ pub struct Alpha;
55
// @matches negative_impl/struct.Bravo.html '//pre' "pub struct Bravo<B>"
66
pub struct Bravo<B>(B);
77

8-
// @matches negative_impl/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
8+
// @matches negative_impl/struct.Alpha.html '//*[@class="impl has-srclink"]//code' \
9+
// "impl !Send for Alpha"
910
impl !Send for Alpha {}
1011

11-
// @matches negative_impl/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
12+
// @matches negative_impl/struct.Bravo.html '//*[@class="impl has-srclink"]//code' "\
13+
// impl<B> !Send for Bravo<B>"
1214
impl<B> !Send for Bravo<B> {}

src/test/rustdoc/pub-method.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ pub fn bar() -> usize {
1010
}
1111

1212
// @has foo/struct.Foo.html
13-
// @has - '//*[@class="method"]' 'pub fn new()'
14-
// @has - '//*[@class="method"]' 'fn not_pub()'
13+
// @has - '//*[@class="method has-srclink"]' 'pub fn new()'
14+
// @has - '//*[@class="method has-srclink"]' 'fn not_pub()'
1515
pub struct Foo(usize);
1616

1717
impl Foo {
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @has basic/struct.Foo.html
22
// @has - '//code' 'impl<T> Send for Foo<T> where T: Send'
33
// @has - '//code' 'impl<T> Sync for Foo<T> where T: Sync'
4-
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
5-
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
4+
// @count - '//*[@id="implementations-list"]//*[@class="impl has-srclink"]' 0
5+
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
66
pub struct Foo<T> {
77
field: T,
88
}

src/test/rustdoc/synthetic_auto/complex.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ mod foo {
2020
}
2121

2222
// @has complex/struct.NotOuter.html
23-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'a, T, K: \
24-
// ?Sized> Send for Outer<'a, T, K> where K: for<'b> Fn((&'b bool, &'a u8)) \
23+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
24+
// "impl<'a, T, K: ?Sized> Send for Outer<'a, T, K> where K: for<'b> Fn((&'b bool, &'a u8)) \
2525
// -> &'b i8, T: MyTrait<'a>, <T as MyTrait<'a>>::MyItem: Copy, 'a: 'static"
2626

2727
pub use foo::{Foo, Inner as NotInner, MyTrait as NotMyTrait, Outer as NotOuter};

src/test/rustdoc/synthetic_auto/lifetimes.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ where
99
{}
1010

1111
// @has lifetimes/struct.Foo.html
12-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Send \
13-
// for Foo<'c, K> where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
12+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
13+
// "impl<'c, K> Send for Foo<'c, K> where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
1414
//
15-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Sync \
16-
// for Foo<'c, K> where K: Sync"
15+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
16+
// "impl<'c, K> Sync for Foo<'c, K> where K: Sync"
1717
pub struct Foo<'c, K: 'c> {
1818
inner_field: Inner<'c, K>,
1919
}

src/test/rustdoc/synthetic_auto/manual.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// @has manual/struct.Foo.html
2-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' 'impl<T> Sync for \
3-
// Foo<T> where T: Sync'
2+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
3+
// 'impl<T> Sync for Foo<T> where T: Sync'
44
//
5-
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//code' \
5+
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]//code' \
66
// 'impl<T> Send for Foo<T>'
77
//
8-
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
9-
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 4
8+
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
9+
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 4
1010
pub struct Foo<T> {
1111
field: T,
1212
}

src/test/rustdoc/synthetic_auto/negative.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ pub struct Inner<T: Copy> {
33
}
44

55
// @has negative/struct.Outer.html
6-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
7-
// Outer<T>"
6+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
7+
// "impl<T> !Send for Outer<T>"
88
//
9-
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> \
10-
// !Sync for Outer<T>"
9+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
10+
// "impl<T> !Sync for Outer<T>"
1111
pub struct Outer<T: Copy> {
1212
inner_field: Inner<T>,
1313
}

0 commit comments

Comments
 (0)