Skip to content

Commit 4304d1d

Browse files
Update rustdoc tests
1 parent 803e35a commit 4304d1d

25 files changed

+77
-52
lines changed

src/test/rustdoc-gui/src/lib2/lib.rs

+27
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,30 @@ pub struct LongItemInfo2;
143143
/// Some docs.
144144
#[doc(cfg(any(target_os = "android", target_os = "linux", target_os = "emscripten", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd")))]
145145
impl SimpleTrait for LongItemInfo2 {}
146+
147+
pub struct WhereWhitespace<T>;
148+
149+
impl<T> WhereWhitespace<T> {
150+
pub fn new<F>(f: F) -> Self
151+
where
152+
F: FnMut() -> i32,
153+
{}
154+
}
155+
156+
impl<K, T> Whitespace<&K> for WhereWhitespace<T>
157+
where
158+
K: std::fmt::Debug,
159+
{
160+
type Output = WhereWhitespace<T>;
161+
fn index(&self, _key: &K) -> &Self::Output {
162+
self
163+
}
164+
}
165+
166+
pub trait Whitespace<Idx>
167+
where
168+
Idx: ?Sized,
169+
{
170+
type Output;
171+
fn index(&self, index: Idx) -> &Self::Output;
172+
}

src/test/rustdoc/const-generics/const-generics-docs.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ impl Trait<{1 + 2}> for u8 {}
3131
impl<const N: usize> Trait<N> for [u8; N] {}
3232

3333
// @has foo/struct.Foo.html '//pre[@class="rust struct"]' \
34-
// 'pub struct Foo<const N: usize> where u8: Trait<N>'
34+
// 'pub struct Foo<const N: usize>where u8: Trait<N>'
3535
pub struct Foo<const N: usize> where u8: Trait<N>;
3636
// @has foo/struct.Bar.html '//pre[@class="rust struct"]' 'pub struct Bar<T, const N: usize>(_)'
3737
pub struct Bar<T, const N: usize>([T; N]);
3838

39-
// @has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Foo<M> where u8: Trait<M>'
39+
// @has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Foo<M>where u8: Trait<M>'
4040
impl<const M: usize> Foo<M> where u8: Trait<M> {
4141
// @has - '//*[@id="associatedconstant.FOO_ASSOC"]' 'pub const FOO_ASSOC: usize'
4242
pub const FOO_ASSOC: usize = M + 13;
@@ -50,14 +50,14 @@ impl<const M: usize> Foo<M> where u8: Trait<M> {
5050
// @has foo/struct.Bar.html '//*[@id="impl-Bar%3Cu8%2C%20M%3E"]/h3[@class="code-header in-band"]' 'impl<const M: usize> Bar<u8, M>'
5151
impl<const M: usize> Bar<u8, M> {
5252
// @has - '//*[@id="method.hey"]' \
53-
// 'pub fn hey<const N: usize>(&self) -> Foo<N> where u8: Trait<N>'
53+
// 'pub fn hey<const N: usize>(&self) -> Foo<N>where u8: Trait<N>'
5454
pub fn hey<const N: usize>(&self) -> Foo<N> where u8: Trait<N> {
5555
Foo
5656
}
5757
}
5858

5959
// @has foo/fn.test.html '//pre[@class="rust fn"]' \
60-
// 'pub fn test<const N: usize>() -> impl Trait<N> where u8: Trait<N>'
60+
// 'pub fn test<const N: usize>() -> impl Trait<N>where u8: Trait<N>'
6161
pub fn test<const N: usize>() -> impl Trait<N> where u8: Trait<N> {
6262
2u8
6363
}

src/test/rustdoc/generic-associated-types/gats.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// @has foo/trait.LendingIterator.html
55
pub trait LendingIterator {
6-
// @has - '//*[@id="associatedtype.Item"]//h4[@class="code-header"]' "type Item<'a> where Self: 'a"
6+
// @has - '//*[@id="associatedtype.Item"]//h4[@class="code-header"]' "type Item<'a>where Self: 'a"
77
type Item<'a> where Self: 'a;
88

99
// @has - '//*[@id="tymethod.next"]//h4[@class="code-header"]' \
@@ -24,7 +24,7 @@ impl LendingIterator for () {
2424
pub struct Infinite<T>(T);
2525

2626
// @has foo/trait.LendingIterator.html
27-
// @has - '//*[@id="associatedtype.Item-2"]//h4[@class="code-header"]' "type Item<'a> where Self: 'a = &'a T"
27+
// @has - '//*[@id="associatedtype.Item-2"]//h4[@class="code-header"]' "type Item<'a>where Self: 'a = &'a T"
2828
impl<T> LendingIterator for Infinite<T> {
2929
type Item<'a> where Self: 'a = &'a T;
3030

src/test/rustdoc/higher-ranked-trait-bounds.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
pub trait Trait<'x> {}
55

66
// @has foo/fn.test1.html
7-
// @has - '//pre' "pub fn test1<T>() where for<'a> &'a T: Iterator,"
7+
// @has - '//pre' "pub fn test1<T>()where for<'a> &'a T: Iterator,"
88
pub fn test1<T>()
99
where
1010
for<'a> &'a T: Iterator,
1111
{
1212
}
1313

1414
// @has foo/fn.test2.html
15-
// @has - '//pre' "pub fn test2<T>() where for<'a, 'b> &'a T: Trait<'b>,"
15+
// @has - '//pre' "pub fn test2<T>()where for<'a, 'b> &'a T: Trait<'b>,"
1616
pub fn test2<T>()
1717
where
1818
for<'a, 'b> &'a T: Trait<'b>,
1919
{
2020
}
2121

2222
// @has foo/fn.test3.html
23-
// @has - '//pre' "pub fn test3<F>() where F: for<'a, 'b> Fn(&'a u8, &'b u8),"
23+
// @has - '//pre' "pub fn test3<F>()where F: for<'a, 'b> Fn(&'a u8, &'b u8),"
2424
pub fn test3<F>()
2525
where
2626
F: for<'a, 'b> Fn(&'a u8, &'b u8),
@@ -38,7 +38,7 @@ pub struct Foo<'a> {
3838
// @has - '//span[@id="structfield.some_trait"]' "some_trait: &'a dyn for<'b> Trait<'b>"
3939

4040
impl<'a> Foo<'a> {
41-
// @has - '//h4[@class="code-header"]' "pub fn bar<T>() where T: Trait<'a>,"
41+
// @has - '//h4[@class="code-header"]' "pub fn bar<T>()where T: Trait<'a>,"
4242
pub fn bar<T>()
4343
where
4444
T: Trait<'a>,

src/test/rustdoc/impl-parts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub auto trait AnAutoTrait {}
66
pub struct Foo<T> { field: T }
77

88
// @has impl_parts/struct.Foo.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
9-
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
9+
// "impl<T: Clone> !AnAutoTrait for Foo<T>where T: Sync,"
1010
// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//h3[@class="code-header in-band"]' \
11-
// "impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync,"
11+
// "impl<T: Clone> !AnAutoTrait for Foo<T>where T: Sync,"
1212
impl<T: Clone> !AnAutoTrait for Foo<T> where T: Sync {}

src/test/rustdoc/issue-20727-4.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
2525

2626
pub mod reexport {
2727
// @has issue_20727_4/reexport/trait.Index.html
28-
// @has - '//*[@class="rust trait"]' 'trait Index<Idx> where Idx: ?Sized, {'
28+
// @has - '//*[@class="rust trait"]' 'trait Index<Idx>where Idx: ?Sized,{'
2929
// @has - '//*[@class="rust trait"]' 'type Output: ?Sized'
3030
// @has - '//*[@class="rust trait"]' \
3131
// 'fn index(&self, index: Idx) -> &Self::Output'
3232
pub use issue_20727::Index;
3333

3434
// @has issue_20727_4/reexport/trait.IndexMut.html
3535
// @has - '//*[@class="rust trait"]' \
36-
// 'trait IndexMut<Idx>: Index<Idx> where Idx: ?Sized, {'
36+
// 'trait IndexMut<Idx>: Index<Idx>where Idx: ?Sized,{'
3737
// @has - '//*[@class="rust trait"]' \
3838
// 'fn index_mut(&mut self, index: Idx) -> &mut Self::Output;'
3939
pub use issue_20727::IndexMut;

src/test/rustdoc/issue-21801.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ extern crate issue_21801;
55

66
// @has issue_21801/struct.Foo.html
77
// @has - '//*[@id="method.new"]' \
8-
// 'fn new<F>(f: F) -> Foo where F: FnMut() -> i32'
8+
// 'fn new<F>(f: F) -> Foowhere F: FnMut() -> i32'
99
pub use issue_21801::Foo;

src/test/rustdoc/issue-29503.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub trait MyTrait {
55
fn my_string(&self) -> String;
66
}
77

8-
// @has - "//div[@id='implementors-list']//*[@id='impl-MyTrait-for-T']//h3[@class='code-header in-band']" "impl<T> MyTrait for T where T: Debug"
8+
// @has - "//div[@id='implementors-list']//*[@id='impl-MyTrait-for-T']//h3[@class='code-header in-band']" "impl<T> MyTrait for Twhere T: Debug"
99
impl<T> MyTrait for T
1010
where
1111
T: fmt::Debug,

src/test/rustdoc/issue-34928.rs

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

33
pub trait Bar {}
44

5-
// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;'
5+
// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T)where T: Bar;'
66
pub struct Foo<T>(pub T) where T: Bar;

src/test/rustdoc/issue-50159.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ impl<B, C> Signal2 for B where B: Signal<Item = C> {
1111
}
1212

1313
// @has issue_50159/struct.Switch.html
14-
// @has - '//h3[@class="code-header in-band"]' 'impl<B> Send for Switch<B> where <B as Signal>::Item: Send'
15-
// @has - '//h3[@class="code-header in-band"]' 'impl<B> Sync for Switch<B> where <B as Signal>::Item: Sync'
14+
// @has - '//h3[@class="code-header in-band"]' 'impl<B> Send for Switch<B>where <B as Signal>::Item: Send'
15+
// @has - '//h3[@class="code-header in-band"]' 'impl<B> Sync for Switch<B>where <B as Signal>::Item: Sync'
1616
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
1717
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
1818
pub struct Switch<B: Signal> {

src/test/rustdoc/issue-51236.rs

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

99
// @has issue_51236/struct.Owned.html
1010
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
11-
// "impl<T> Send for Owned<T> where <T as Owned<'static>>::Reader: Send"
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-54705.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
pub trait ScopeHandle<'scope> {}
22

3-
4-
53
// @has issue_54705/struct.ScopeFutureContents.html
64
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
7-
// "impl<'scope, S> Send for ScopeFutureContents<'scope, S> where S: Sync"
5+
// "impl<'scope, S> Send for ScopeFutureContents<'scope, S>where S: Sync"
86
//
97
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
10-
// "impl<'scope, S> Sync for ScopeFutureContents<'scope, S> where S: Sync"
8+
// "impl<'scope, S> Sync for ScopeFutureContents<'scope, S>where S: Sync"
119
pub struct ScopeFutureContents<'scope, S>
1210
where S: ScopeHandle<'scope>,
1311
{

src/test/rustdoc/issue-98697.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
extern crate issue_98697_reexport_with_anonymous_lifetime;
1010

11-
// @has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'fn repro<F>() where F: Fn(&str)'
11+
// @has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'fn repro<F>()where F: Fn(&str)'
1212
// @!has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'for<'
1313
pub use issue_98697_reexport_with_anonymous_lifetime::repro;
1414

src/test/rustdoc/primitive-slice-auto-trait.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// @has - '//span[@class="in-band"]' 'Primitive Type slice'
88
// @has - '//section[@id="main-content"]//div[@class="docblock"]//p' 'this is a test!'
99
// @has - '//h2[@id="synthetic-implementations"]' 'Auto Trait Implementations'
10-
// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Send for [T] where T: Send'
11-
// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Sync for [T] where T: Sync'
10+
// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Send for [T]where T: Send'
11+
// @has - '//div[@id="synthetic-implementations-list"]//h3' 'impl<T> Sync for [T]where T: Sync'
1212
#[doc(primitive = "slice")]
1313
/// this is a test!
1414
mod slice_prim {}

src/test/rustdoc/synthetic_auto/basic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @has basic/struct.Foo.html
2-
// @has - '//h3[@class="code-header in-band"]' 'impl<T> Send for Foo<T> where T: Send'
3-
// @has - '//h3[@class="code-header in-band"]' 'impl<T> Sync for Foo<T> where T: Sync'
2+
// @has - '//h3[@class="code-header in-band"]' 'impl<T> Send for Foo<T>where T: Send'
3+
// @has - '//h3[@class="code-header in-band"]' 'impl<T> Sync for Foo<T>where T: Sync'
44
// @count - '//*[@id="implementations-list"]//*[@class="impl has-srclink"]' 0
55
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5
66
pub struct Foo<T> {

src/test/rustdoc/synthetic_auto/complex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mod foo {
2121

2222
// @has complex/struct.NotOuter.html
2323
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
24-
// "impl<'a, T, K: ?Sized> Send for Outer<'a, T, K> where K: for<'b> Fn((&'b bool, &'a u8)) \
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ where
1010

1111
// @has lifetimes/struct.Foo.html
1212
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
13-
// "impl<'c, K> Send for Foo<'c, K> where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
13+
// "impl<'c, K> Send for Foo<'c, K>where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static"
1414
//
1515
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
16-
// "impl<'c, K> Sync for Foo<'c, K> where K: Sync"
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @has manual/struct.Foo.html
22
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
3-
// 'impl<T> Sync for Foo<T> where T: Sync'
3+
// 'impl<T> Sync for Foo<T>where T: Sync'
44
//
55
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
66
// 'impl<T> Send for Foo<T>'

src/test/rustdoc/synthetic_auto/nested.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ where
1010

1111
// @has nested/struct.Foo.html
1212
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
13-
// 'impl<T> Send for Foo<T> where T: Copy'
13+
// 'impl<T> Send for Foo<T>where T: Copy'
1414
//
1515
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
16-
// 'impl<T> Sync for Foo<T> where T: Sync'
16+
// 'impl<T> Sync for Foo<T>where T: Sync'
1717
pub struct Foo<T> {
1818
inner_field: Inner<T>,
1919
}

src/test/rustdoc/synthetic_auto/no-redundancy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ where
1010

1111
// @has no_redundancy/struct.Outer.html
1212
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
13-
// "impl<T> Send for Outer<T> where T: Send + Copy"
13+
// "impl<T> Send for Outer<T>where T: Send + Copy"
1414
pub struct Outer<T> {
1515
inner_field: Inner<T>,
1616
}

src/test/rustdoc/synthetic_auto/project.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ where
2424

2525
// @has project/struct.Foo.html
2626
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
27-
// "impl<'c, K> Send for Foo<'c, K> where K: MyTrait<MyItem = bool>, 'c: 'static"
27+
// "impl<'c, K> Send for Foo<'c, K>where K: MyTrait<MyItem = bool>, 'c: 'static"
2828
//
2929
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
30-
// "impl<'c, K> Sync for Foo<'c, K> where K: MyTrait, <K as MyTrait>::MyItem: OtherTrait, \
30+
// "impl<'c, K> Sync for Foo<'c, K>where K: MyTrait, <K as MyTrait>::MyItem: OtherTrait, \
3131
// 'c: 'static,"
3232
pub struct Foo<'c, K: 'c> {
3333
inner_field: Inner<'c, K>,

src/test/rustdoc/synthetic_auto/self-referential.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ impl<T> Pattern for Wrapper<T> {
2424

2525
// @has self_referential/struct.WriteAndThen.html
2626
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
27-
// "impl<P1> Send for WriteAndThen<P1> where <P1 as Pattern>::Value: Send"
27+
// "impl<P1> Send for WriteAndThen<P1>where <P1 as Pattern>::Value: Send"
2828
pub struct WriteAndThen<P1>(pub P1::Value,pub <Constrain<P1, Wrapper<P1::Value>> as Pattern>::Value)
2929
where P1: Pattern;

src/test/rustdoc/synthetic_auto/static-region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub trait OwnedTrait<'a> {
44

55
// @has static_region/struct.Owned.html
66
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
7-
// "impl<T> Send for Owned<T> where <T as OwnedTrait<'static>>::Reader: Send"
7+
// "impl<T> Send for Owned<T>where <T as OwnedTrait<'static>>::Reader: Send"
88
pub struct Owned<T> where T: OwnedTrait<'static> {
99
marker: <T as OwnedTrait<'static>>::Reader,
1010
}

src/test/rustdoc/where-clause-order.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ where
77
}
88

99
// @has 'foo/trait.SomeTrait.html'
10-
// @has - "//*[@id='impl-SomeTrait%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-(A%2C%20B%2C%20C%2C%20D%2C%20E)']/h3" "impl<A, B, C, D, E> SomeTrait<(A, B, C, D, E)> for (A, B, C, D, E) where A: PartialOrd<A> + PartialEq<A>, B: PartialOrd<B> + PartialEq<B>, C: PartialOrd<C> + PartialEq<C>, D: PartialOrd<D> + PartialEq<D>, E: PartialOrd<E> + PartialEq<E> + ?Sized, "
10+
// @has - "//*[@id='impl-SomeTrait%3C(A%2C%20B%2C%20C%2C%20D%2C%20E)%3E-for-(A%2C%20B%2C%20C%2C%20D%2C%20E)']/h3" "impl<A, B, C, D, E> SomeTrait<(A, B, C, D, E)> for (A, B, C, D, E)where A: PartialOrd<A> + PartialEq<A>, B: PartialOrd<B> + PartialEq<B>, C: PartialOrd<C> + PartialEq<C>, D: PartialOrd<D> + PartialEq<D>, E: PartialOrd<E> + PartialEq<E> + ?Sized, "
1111
impl<A, B, C, D, E> SomeTrait<(A, B, C, D, E)> for (A, B, C, D, E)
1212
where
1313
A: PartialOrd<A> + PartialEq<A>,

src/test/rustdoc/where.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
pub trait MyTrait { fn dummy(&self) { } }
55

6-
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(_) where A: MyTrait"
6+
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(_)where A: MyTrait"
77
pub struct Alpha<A>(A) where A: MyTrait;
8-
// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B> where B: MyTrait"
8+
// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B>where B: MyTrait"
99
pub trait Bravo<B> where B: MyTrait { fn get(&self, B: B); }
10-
// @has foo/fn.charlie.html '//pre' "pub fn charlie<C>() where C: MyTrait"
10+
// @has foo/fn.charlie.html '//pre' "pub fn charlie<C>()where C: MyTrait"
1111
pub fn charlie<C>() where C: MyTrait {}
1212

1313
pub struct Delta<D>(D);
1414

1515
// @has foo/struct.Delta.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
16-
// "impl<D> Delta<D> where D: MyTrait"
16+
// "impl<D> Delta<D>where D: MyTrait"
1717
impl<D> Delta<D> where D: MyTrait {
1818
pub fn delta() {}
1919
}
@@ -33,19 +33,19 @@ pub trait TraitWhere {
3333
}
3434

3535
// @has foo/struct.Echo.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
36-
// "impl<E> MyTrait for Echo<E> where E: MyTrait"
36+
// "impl<E> MyTrait for Echo<E>where E: MyTrait"
3737
// @has foo/trait.MyTrait.html '//*[@id="implementors-list"]//h3[@class="code-header in-band"]' \
38-
// "impl<E> MyTrait for Echo<E> where E: MyTrait"
39-
impl<E> MyTrait for Echo<E> where E: MyTrait {}
38+
// "impl<E> MyTrait for Echo<E>where E: MyTrait"
39+
impl<E> MyTrait for Echo<E>where E: MyTrait {}
4040

4141
pub enum Foxtrot<F> { Foxtrot1(F) }
4242

4343
// @has foo/enum.Foxtrot.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \
44-
// "impl<F> MyTrait for Foxtrot<F> where F: MyTrait"
44+
// "impl<F> MyTrait for Foxtrot<F>where F: MyTrait"
4545
// @has foo/trait.MyTrait.html '//*[@id="implementors-list"]//h3[@class="code-header in-band"]' \
46-
// "impl<F> MyTrait for Foxtrot<F> where F: MyTrait"
47-
impl<F> MyTrait for Foxtrot<F> where F: MyTrait {}
46+
// "impl<F> MyTrait for Foxtrot<F>where F: MyTrait"
47+
impl<F> MyTrait for Foxtrot<F>where F: MyTrait {}
4848

4949
// @has foo/type.Golf.html '//pre[@class="rust typedef"]' \
50-
// "type Golf<T> where T: Clone, = (T, T)"
50+
// "type Golf<T>where T: Clone, = (T, T)"
5151
pub type Golf<T> where T: Clone = (T, T);

0 commit comments

Comments
 (0)