Skip to content

Commit 4e07938

Browse files
authored
Rollup merge of rust-lang#101245 - GuillaumeGomez:remove-unneeded-where-whitespace, r=notriddle
Remove unneeded where whitespace It fixes these two bugs: ![Screenshot from 2022-08-31 18-14-40](https://user-images.githubusercontent.com/3050060/187727950-94657419-abfa-454c-9d27-004280fbcb45.png) ![Screenshot from 2022-08-31 18-14-49](https://user-images.githubusercontent.com/3050060/187727956-21d1b39d-62d7-4e7b-8f6f-631ceda67a19.png) It's a relic from a very old time (this commit: rust-lang@bfd01b7). You can test the result [here](https://rustdoc.crud.net/imperio/remove-unneeded-where-whitespace/lib2/struct.WhereWhitespace.html). cc ``````@jsha`````` r? ``````@notriddle``````
2 parents 7298451 + b112bfe commit 4e07938

28 files changed

+114
-67
lines changed

src/librustdoc/html/format.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,7 @@ pub(crate) fn print_where_clause<'a, 'tcx: 'a>(
349349
let where_preds = comma_sep(where_predicates, false);
350350
let clause = if f.alternate() {
351351
if ending == Ending::Newline {
352-
// add a space so stripping <br> tags and breaking spaces still renders properly
353-
format!(" where{where_preds}, ")
352+
format!(" where{where_preds},")
354353
} else {
355354
format!(" where{where_preds}")
356355
}
@@ -364,20 +363,16 @@ pub(crate) fn print_where_clause<'a, 'tcx: 'a>(
364363

365364
if ending == Ending::Newline {
366365
let mut clause = "&nbsp;".repeat(indent.saturating_sub(1));
367-
// add a space so stripping <br> tags and breaking spaces still renders properly
368-
write!(
369-
clause,
370-
" <span class=\"where fmt-newline\">where{where_preds},&nbsp;</span>"
371-
)?;
366+
write!(clause, "<span class=\"where fmt-newline\">where{where_preds},</span>")?;
372367
clause
373368
} else {
374369
// insert a <br> tag after a single space but before multiple spaces at the start
375370
if indent == 0 {
376-
format!(" <br><span class=\"where\">where{where_preds}</span>")
371+
format!("<br><span class=\"where\">where{where_preds}</span>")
377372
} else {
378373
let mut clause = br_with_padding;
379374
clause.truncate(clause.len() - 5 * "&nbsp;".len());
380-
write!(clause, " <span class=\"where\">where{where_preds}</span>")?;
375+
write!(clause, "<span class=\"where\">where{where_preds}</span>")?;
381376
clause
382377
}
383378
}

src/librustdoc/html/render/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1737,8 +1737,8 @@ pub(crate) fn render_impl_summary(
17371737
// in documentation pages for trait with automatic implementations like "Send" and "Sync".
17381738
aliases: &[String],
17391739
) {
1740-
let id =
1741-
cx.derive_id(get_id_for_impl(&i.inner_impl().for_, i.inner_impl().trait_.as_ref(), cx));
1740+
let inner_impl = i.inner_impl();
1741+
let id = cx.derive_id(get_id_for_impl(&inner_impl.for_, inner_impl.trait_.as_ref(), cx));
17421742
let aliases = if aliases.is_empty() {
17431743
String::new()
17441744
} else {
@@ -1750,9 +1750,9 @@ pub(crate) fn render_impl_summary(
17501750
write!(w, "<h3 class=\"code-header in-band\">");
17511751

17521752
if let Some(use_absolute) = use_absolute {
1753-
write!(w, "{}", i.inner_impl().print(use_absolute, cx));
1753+
write!(w, "{}", inner_impl.print(use_absolute, cx));
17541754
if show_def_docs {
1755-
for it in &i.inner_impl().items {
1755+
for it in &inner_impl.items {
17561756
if let clean::AssocTypeItem(ref tydef, ref _bounds) = *it.kind {
17571757
w.write_str("<span class=\"where fmt-newline\"> ");
17581758
assoc_type(
@@ -1770,11 +1770,11 @@ pub(crate) fn render_impl_summary(
17701770
}
17711771
}
17721772
} else {
1773-
write!(w, "{}", i.inner_impl().print(false, cx));
1773+
write!(w, "{}", inner_impl.print(false, cx));
17741774
}
17751775
write!(w, "</h3>");
17761776

1777-
let is_trait = i.inner_impl().trait_.is_some();
1777+
let is_trait = inner_impl.trait_.is_some();
17781778
if is_trait {
17791779
if let Some(portability) = portability(&i.impl_item, Some(parent)) {
17801780
write!(w, "<span class=\"item-info\">{}</span>", portability);

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+
}
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// This test ensures that the where conditions are correctly displayed.
2+
goto: file://|DOC_PATH|/lib2/trait.Whitespace.html
3+
show-text: true
4+
// First, we check in the trait definition if the where clause is "on its own" (not on the same
5+
// line than "pub trait Whitespace<Idx>").
6+
compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y"))
7+
// And that the code following it isn't on the same line either.
8+
compare-elements-position-false: (".item-decl .fnname", ".where.fmt-newline", ("y"))
9+
10+
goto: file://|DOC_PATH|/lib2/struct.WhereWhitespace.html
11+
// We make the screen a bit wider to ensure that the trait impl is on one line.
12+
size: (915, 915)
13+
14+
compare-elements-position-false: ("#method\.new .fnname", "#method\.new .where.fmt-newline", ("y"))
15+
// We ensure that both the trait name and the struct name are on the same line in
16+
// "impl<K, T> Whitespace<&K> for WhereWhitespace<T>".
17+
compare-elements-position: (
18+
"#trait-implementations-list .impl h3 .trait",
19+
"#trait-implementations-list .impl h3 .struct",
20+
("y"),
21+
)
22+
// And we now check that the where condition isn't on the same line.
23+
compare-elements-position-false: (
24+
"#trait-implementations-list .impl h3 .trait",
25+
"#trait-implementations-list .impl h3 .where.fmt-newline",
26+
("y"),
27+
)

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>,

0 commit comments

Comments
 (0)