Skip to content

Commit

Permalink
Update rustdoc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 2, 2021
1 parent fab6814 commit 14fe83f
Show file tree
Hide file tree
Showing 36 changed files with 100 additions and 94 deletions.
6 changes: 3 additions & 3 deletions src/test/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 - '//div[@class="method"]' 'pub async fn complicated_lifetimes( &self, context: &impl Bar) -> impl Iterator<Item = &usize>'
// @has - '//div[@class="method has-srclink"]' '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 - '//div[@class="method"]' "pub async fn readable<T>(&self) -> Result<AsyncFdReadyGuard<'_, T>, ()>"
// @has - '//div[@class="method has-srclink"]' "pub async fn readable<T>(&self) -> Result<AsyncFdReadyGuard<'_, T>, ()>"
pub async fn readable<T>(&self) -> Result<AsyncFdReadyGuard<'_, T>, ()> {}
// @has - '//div[@class="method"]' "pub async fn mut_self(&mut self)"
// @has - '//div[@class="method has-srclink"]' "pub async fn mut_self(&mut self)"
pub async fn mut_self(&mut self) {}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/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"]' 'const fn new()'
// @has - '//*[@class="method has-srclink"]' 'const fn new()'
pub struct Foo(usize);

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

// @has foo/trait.Array.html
// @has - '//div[@class="impl"]' 'impl<T, const N: usize> Array for [T; N]'
// @has - '//div[@class="impl has-srclink"]' '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 src/test/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"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
// @has doc_assoc_item/struct.Foo.html '//*[@class="impl has-srclink"]' '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 src/test/rustdoc/duplicate_impls/issue-33054.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @has issue_33054/impls/struct.Foo.html
// @has - '//code' 'impl Foo'
// @has - '//code' 'impl Bar for Foo'
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
// @count - '//*[@id="main"]/details/summary/*[@class="impl"]' 1
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @count - '//*[@id="main"]/details/summary/*[@class="impl has-srclink"]' 1
// @has issue_33054/impls/bar/trait.Bar.html
// @has - '//code' 'impl Bar for Foo'
// @count - '//*[@class="struct"]' 1
Expand Down
2 changes: 1 addition & 1 deletion src/test/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"]//code' \
// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//code' \
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//code' \
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
Expand Down
4 changes: 2 additions & 2 deletions src/test/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"]//code' 'Bark for'
// @has - '//*[@class="impl"]//code' 'Woof for'
// @has - '//*[@class="impl has-srclink"]//code' 'Bark for'
// @has - '//*[@class="impl has-srclink"]//code' 'Woof for'
// @!has - '//*[@class="impl"]//code' 'Bar for'
// @!has - '//*[@class="impl"]//code' 'Qux for'
pub use rustdoc_nonreachable_impls::hidden::Wobble;
Expand Down
6 changes: 3 additions & 3 deletions src/test/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"]//code' 'Qux for'
// @has - '//*[@class="impl"]//code' 'Bark for'
// @has - '//*[@class="impl"]//code' 'Woof for'
// @has - '//*[@class="impl has-srclink"]//code' 'Qux for'
// @has - '//*[@class="impl has-srclink"]//code' 'Bark for'
// @has - '//*[@class="impl has-srclink"]//code' 'Woof for'
// @!has - '//*[@class="impl"]//code' 'Bar for'
pub use rustdoc_nonreachable_impls::hidden::Wobble;

Expand Down
6 changes: 3 additions & 3 deletions src/test/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"]//code' 'Bark for'
// @has - '//*[@class="impl"]//code' 'Woof for'
// @!has - '//*[@class="impl"]//code' 'Bar for'
// @has - '//*[@class="impl has-srclink"]//code' 'Bark for'
// @has - '//*[@class="impl has-srclink"]//code' 'Woof for'
// @!has - '//*[@class="impl has-srclink"]//code' 'Bar for'
// @!has - '//*[@class="impl"]//code' 'Qux for'
pub use rustdoc_nonreachable_impls::Foo;

Expand Down
2 changes: 1 addition & 1 deletion src/test/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"]' 1
// '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
pub struct What;
6 changes: 3 additions & 3 deletions src/test/rustdoc/issue-33302.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ macro_rules! make {
}

// @has issue_33302/struct.S.html \
// '//div[@class="impl"]' 'impl T<[i32; 16]> for S'
// '//div[@class="impl has-srclink"]' '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 \
// '//div[@class="impl"]' 'impl T<[i32; 16]> for S'
// '//div[@class="impl has-srclink"]' '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 \
// '//div[@class="impl"]' 'impl T<(i32, i32)> for S'
// '//div[@class="impl has-srclink"]' '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 src/test/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"]' 1
// @has - '//*[@class="impl"]' "impl Bar<Foo1, &'static Foo1> for Foo1"
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @has - '//*[@class="impl has-srclink"]' "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"]' 1
// @has - '//*[@class="impl"]' "impl Bar<&'static Foo2, Foo2> for u8"
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @has - '//*[@class="impl has-srclink"]' "impl Bar<&'static Foo2, Foo2> for u8"
impl Bar<&'static Foo2, Foo2> for u8 {}
2 changes: 1 addition & 1 deletion src/test/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 - '//code' 'impl<B> Send for Switch<B> where <B as Signal>::Item: Send'
// @has - '//code' '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"]' 5
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
pub struct Switch<B: Signal> {
pub inner: <B as Signal2>::Item2,
}
4 changes: 2 additions & 2 deletions src/test/rustdoc/issue-51236.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub mod traits {
}

// @has issue_51236/struct.Owned.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> Send for \
// Owned<T> where <T as Owned<'static>>::Reader: Send"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "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>,
}
10 changes: 5 additions & 5 deletions src/test/rustdoc/issue-53812.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ macro_rules! array_impls {
}

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


// @has issue_54705/struct.ScopeFutureContents.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'scope, S> \
// Send for ScopeFutureContents<'scope, S> where S: Sync"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<'scope, S> Send for ScopeFutureContents<'scope, S> where S: Sync"
//
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'scope, S> \
// Sync for ScopeFutureContents<'scope, S> where S: Sync"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<'scope, S> Sync for ScopeFutureContents<'scope, S> where S: Sync"
pub struct ScopeFutureContents<'scope, S>
where S: ScopeHandle<'scope>,
{
Expand Down
14 changes: 8 additions & 6 deletions src/test/rustdoc/issue-55321.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#![feature(negative_impls)]

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

impl !Send for A {}
impl !Sync for A {}

// @has issue_55321/struct.B.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
// B<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
// B<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<T> !Send for B<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<T> !Sync for B<T>"
pub struct B<T: ?Sized>(A, Box<T>);
4 changes: 2 additions & 2 deletions src/test/rustdoc/issue-56822.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ impl<'a, T> MyTrait for Inner<'a, T> {
}

// @has issue_56822/struct.Parser.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'a> Send for \
// Parser<'a>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<'a> Send for Parser<'a>"
pub struct Parser<'a> {
field: <Wrapper<Inner<'a, u8>> as MyTrait>::Output
}
8 changes: 4 additions & 4 deletions src/test/rustdoc/issue-60726.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ where
{}

// @has issue_60726/struct.IntoIter.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
// IntoIter<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
// IntoIter<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<T> !Send for IntoIter<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<T> !Sync for IntoIter<T>"
pub struct IntoIter<T>{
hello:DynTrait<FooInterface<T>>,
}
3 changes: 2 additions & 1 deletion src/test/rustdoc/issue-76501.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ pub const fn bloop() -> i32 {
pub struct Struct {}

impl Struct {
// @has 'issue_76501/struct.Struct.html' '//*[@class="method"]' 'pub const fn blurp() -> i32'
// @has 'issue_76501/struct.Struct.html' '//*[@class="method has-srclink"]' \
// 'pub const fn blurp() -> i32'
/// A useless function that always returns 1.
pub const fn blurp() -> i32 {
1
Expand Down
8 changes: 4 additions & 4 deletions src/test/rustdoc/issue-78673.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ pub trait AnAmazingTrait {}
impl<T: Something> AnAmazingTrait for T {}

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

impl AnAmazingTrait for MyStruct {}

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

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

impl<T: Something> Something for AnotherStruct<T> {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/mut-params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

pub struct Foo;

// @count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 2
// @count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method has-srclink"]' 2
// @!has - '//*[@class="impl-items"]//*[@class="method"]' 'mut'
impl Foo {
pub fn foo(mut self) {}
Expand Down
6 changes: 4 additions & 2 deletions src/test/rustdoc/negative-impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ pub struct Alpha;
// @matches negative_impl/struct.Bravo.html '//pre' "pub struct Bravo<B>"
pub struct Bravo<B>(B);

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

// @matches negative_impl/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
// @matches negative_impl/struct.Bravo.html '//*[@class="impl has-srclink"]//code' "\
// impl<B> !Send for Bravo<B>"
impl<B> !Send for Bravo<B> {}
4 changes: 2 additions & 2 deletions src/test/rustdoc/pub-method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pub fn bar() -> usize {
}

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

impl Foo {
Expand Down
4 changes: 2 additions & 2 deletions src/test/rustdoc/synthetic_auto/basic.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @has basic/struct.Foo.html
// @has - '//code' 'impl<T> Send for Foo<T> where T: Send'
// @has - '//code' 'impl<T> Sync for Foo<T> where T: Sync'
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
// @count - '//*[@id="implementations-list"]//*[@class="impl has-srclink"]' 0
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
pub struct Foo<T> {
field: T,
}
4 changes: 2 additions & 2 deletions src/test/rustdoc/synthetic_auto/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ mod foo {
}

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

pub use foo::{Foo, Inner as NotInner, MyTrait as NotMyTrait, Outer as NotOuter};
Expand Down
8 changes: 4 additions & 4 deletions src/test/rustdoc/synthetic_auto/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ where
{}

// @has lifetimes/struct.Foo.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Send \
// for Foo<'c, K> where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<'c, K> Send for Foo<'c, K> where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
//
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Sync \
// for Foo<'c, K> where K: Sync"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<'c, K> Sync for Foo<'c, K> where K: Sync"
pub struct Foo<'c, K: 'c> {
inner_field: Inner<'c, K>,
}
10 changes: 5 additions & 5 deletions src/test/rustdoc/synthetic_auto/manual.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// @has manual/struct.Foo.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' 'impl<T> Sync for \
// Foo<T> where T: Sync'
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// 'impl<T> Sync for Foo<T> where T: Sync'
//
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//code' \
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]//code' \
// 'impl<T> Send for Foo<T>'
//
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 4
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 4
pub struct Foo<T> {
field: T,
}
Expand Down
8 changes: 4 additions & 4 deletions src/test/rustdoc/synthetic_auto/negative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ pub struct Inner<T: Copy> {
}

// @has negative/struct.Outer.html
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
// Outer<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<T> !Send for Outer<T>"
//
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> \
// !Sync for Outer<T>"
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//code' \
// "impl<T> !Sync for Outer<T>"
pub struct Outer<T: Copy> {
inner_field: Inner<T>,
}
Loading

0 comments on commit 14fe83f

Please sign in to comment.