Skip to content

Commit 569096c

Browse files
committed
rustdoc: use details tag for trait implementors
This switches from JS-generated toggles to using the HTML <details> tag for expanding and collapsing entries in the "Implementors" section.
1 parent 392ba2b commit 569096c

25 files changed

+68
-66
lines changed

src/librustdoc/html/render/mod.rs

+12-3
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,7 @@ fn render_impl(
13131313
let cache = cx.cache();
13141314
let traits = &cache.traits;
13151315
let trait_ = i.trait_did_full(cache).map(|did| &traits[&did]);
1316+
let mut close_tags = String::new();
13161317

13171318
if render_mode == RenderMode::Normal {
13181319
let id = cx.derive_id(match i.inner_impl().trait_ {
@@ -1331,7 +1332,12 @@ fn render_impl(
13311332
format!(" aliases=\"{}\"", aliases.join(","))
13321333
};
13331334
if let Some(use_absolute) = use_absolute {
1334-
write!(w, "<h3 id=\"{}\" class=\"impl\"{}><code class=\"in-band\">", id, aliases);
1335+
write!(
1336+
w,
1337+
"<details class=\"rustdoc-toggle implementors-toggle\"><summary><h3 id=\"{}\" class=\"impl\"{}><code class=\"in-band\">",
1338+
id, aliases
1339+
);
1340+
close_tags.insert_str(0, "</details>");
13351341
write!(w, "{}", i.inner_impl().print(use_absolute, cx));
13361342
if show_def_docs {
13371343
for it in &i.inner_impl().items {
@@ -1354,11 +1360,12 @@ fn render_impl(
13541360
} else {
13551361
write!(
13561362
w,
1357-
"<h3 id=\"{}\" class=\"impl\"{}><code class=\"in-band\">{}</code>",
1363+
"<details class=\"rustdoc-toggle implementors-toggle\"><summary><h3 id=\"{}\" class=\"impl\"{}><code class=\"in-band\">{}</code>",
13581364
id,
13591365
aliases,
13601366
i.inner_impl().print(false, cx)
13611367
);
1368+
close_tags.insert_str(0, "</details>");
13621369
}
13631370
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
13641371
render_stability_since_raw(
@@ -1370,6 +1377,7 @@ fn render_impl(
13701377
);
13711378
write_srclink(cx, &i.impl_item, w);
13721379
w.write_str("</h3>");
1380+
w.write_str("</summary>");
13731381

13741382
if trait_.is_some() {
13751383
if let Some(portability) = portability(&i.impl_item, Some(parent)) {
@@ -1580,6 +1588,7 @@ fn render_impl(
15801588
}
15811589

15821590
w.write_str("<div class=\"impl-items\">");
1591+
close_tags.insert_str(0, "</div>");
15831592
for trait_item in &i.inner_impl().items {
15841593
doc_impl_item(
15851594
w,
@@ -1650,7 +1659,7 @@ fn render_impl(
16501659
);
16511660
}
16521661
}
1653-
w.write_str("</div>");
1662+
w.write_str(&close_tags);
16541663
}
16551664

16561665
fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) {

src/librustdoc/html/static/main.js

+7-20
Original file line numberDiff line numberDiff line change
@@ -1196,31 +1196,18 @@ function hideThemeButtonState() {
11961196
if (!next) {
11971197
return;
11981198
}
1199-
if (hasClass(e, "impl") &&
1200-
(next.getElementsByClassName("method").length > 0 ||
1201-
next.getElementsByClassName("associatedconstant").length > 0)) {
1202-
var newToggle = toggle.cloneNode(true);
1203-
insertAfter(newToggle, e.childNodes[e.childNodes.length - 1]);
1204-
// In case the option "auto-collapse implementors" is not set to false, we collapse
1205-
// all implementors.
1206-
if (hideImplementors === true && e.parentNode.id === "implementors-list") {
1207-
collapseDocs(newToggle, "hide");
1208-
}
1209-
}
12101199
};
12111200

12121201
onEachLazy(document.getElementsByClassName("method"), func);
12131202
onEachLazy(document.getElementsByClassName("associatedconstant"), func);
1214-
onEachLazy(document.getElementsByClassName("impl"), funcImpl);
12151203
var impl_call = function() {};
1216-
// Large items are hidden by default in the HTML. If the setting overrides that, show 'em.
1217-
if (!hideLargeItemContents) {
1218-
onEachLazy(document.getElementsByTagName("details"), function (e) {
1219-
if (hasClass(e, "type-contents-toggle")) {
1220-
e.open = true;
1221-
}
1222-
});
1223-
}
1204+
onEachLazy(document.getElementsByTagName("details"), function (e) {
1205+
var showLargeItem = !hideLargeItemContents && hasClass(e, "type-contents-toggle");
1206+
var showImplementor = !hideImplementors && hasClass(e, "implementors-toggle");
1207+
if (showLargeItem || showImplementor) {
1208+
e.open = true;
1209+
}
1210+
});
12241211
if (hideMethodDocs === true) {
12251212
impl_call = function(e, newToggle) {
12261213
if (e.id.match(/^impl(?:-\d+)?$/) === null) {

src/librustdoc/html/static/rustdoc.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,10 @@ h4 > .notable-traits {
15611561
left: -10px;
15621562
}
15631563

1564+
.item-list > details.rustdoc-toggle > summary:not(.hideme)::before {
1565+
left: -10px;
1566+
}
1567+
15641568
#all-types {
15651569
margin: 10px;
15661570
}
@@ -1775,14 +1779,16 @@ details.rustdoc-toggle > summary::before {
17751779
font-weight: 300;
17761780
font-size: 0.8em;
17771781
letter-spacing: 1px;
1782+
cursor: pointer;
17781783
}
17791784

17801785
details.rustdoc-toggle > summary.hideme::before {
17811786
position: relative;
17821787
}
17831788

17841789
details.rustdoc-toggle > summary:not(.hideme)::before {
1785-
float: left;
1790+
position: absolute;
1791+
left: -23px;
17861792
}
17871793

17881794
/* When a "hideme" summary is open and the "Expand description" or "Show

src/test/rustdoc/const-generics/add-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct Simd<T, const WIDTH: usize> {
88
inner: T,
99
}
1010

11-
// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]/h3/code' 'impl Add<Simd<u8, 16_usize>> for Simd<u8, 16>'
11+
// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3/code' 'impl Add<Simd<u8, 16_usize>> for Simd<u8, 16>'
1212
impl Add for Simd<u8, 16> {
1313
type Output = Self;
1414

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"]/*[@class="impl"]' 1
4+
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
5+
// @count - '//*[@id="main"]/details/summary/*[@class="impl"]' 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/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"]' 1
1111
pub struct What;

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']/h3[@id='impl-MyTrait']//code" "impl<T> MyTrait for T where T: Debug"
8+
// @has - "//div[@id='implementors-list']//h3[@id='impl-MyTrait']//code" "impl<T> MyTrait for T where T: Debug"
99
impl<T> MyTrait for T where T: fmt::Debug {
1010
fn my_string(&self) -> String {
1111
format!("{:?}", self)

src/test/rustdoc/issue-45584.rs

+2-2
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
7+
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
88
// @has - '//*[@class="impl"]' "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
13+
// @count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
1414
// @has - '//*[@class="impl"]' "impl Bar<&'static Foo2, Foo2> for u8"
1515
impl Bar<&'static Foo2, Foo2> for u8 {}

src/test/rustdoc/issue-50159.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ impl<B, C> Signal2 for B where B: Signal<Item = C> {
1313
// @has issue_50159/struct.Switch.html
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'
16-
// @count - '//*[@id="implementations-list"]/*[@class="impl"]' 0
17-
// @count - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]' 5
16+
// @count - '//*[@id="implementations-list"]//*[@class="impl"]' 0
17+
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
1818
pub struct Switch<B: Signal> {
1919
pub inner: <B as Signal2>::Item2,
2020
}

src/test/rustdoc/issue-51236.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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 \
10+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> Send for \
1111
// 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>,

src/test/rustdoc/issue-53812.rs

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

15-
// @has issue_53812/trait.MyIterator.html '//*[@id="implementors-list"]//h3[1]' 'MyStruct<[T; 0]>'
16-
// @has - '//*[@id="implementors-list"]//h3[2]' 'MyStruct<[T; 1]>'
17-
// @has - '//*[@id="implementors-list"]//h3[3]' 'MyStruct<[T; 2]>'
18-
// @has - '//*[@id="implementors-list"]//h3[4]' 'MyStruct<[T; 3]>'
19-
// @has - '//*[@id="implementors-list"]//h3[5]' 'MyStruct<[T; 10]>'
15+
// @has issue_53812/trait.MyIterator.html '//*[@id="implementors-list"]/details[1]/summary/h3' 'MyStruct<[T; 0]>'
16+
// @has - '//*[@id="implementors-list"]/details[2]/summary/h3' 'MyStruct<[T; 1]>'
17+
// @has - '//*[@id="implementors-list"]/details[3]/summary/h3' 'MyStruct<[T; 2]>'
18+
// @has - '//*[@id="implementors-list"]/details[4]/summary/h3' 'MyStruct<[T; 3]>'
19+
// @has - '//*[@id="implementors-list"]/details[5]/summary/h3' 'MyStruct<[T; 10]>'
2020
array_impls! { 10 3 2 1 0 }

src/test/rustdoc/issue-54705.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ 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> \
6+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'scope, S> \
77
// Send for ScopeFutureContents<'scope, S> where S: Sync"
88
//
9-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<'scope, S> \
9+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'scope, S> \
1010
// Sync for ScopeFutureContents<'scope, S> where S: Sync"
1111
pub struct ScopeFutureContents<'scope, S>
1212
where S: ScopeHandle<'scope>,

src/test/rustdoc/issue-55321.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
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"]//code' "impl !Send for A"
5+
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//code' "impl !Sync for A"
66
pub struct A();
77

88
impl !Send for A {}
99
impl !Sync for A {}
1010

1111
// @has issue_55321/struct.B.html
12-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> !Send for \
12+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
1313
// B<T>"
14-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> !Sync for \
14+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
1515
// B<T>"
1616
pub struct B<T: ?Sized>(A, Box<T>);

src/test/rustdoc/issue-56822.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ 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 \
20+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'a> Send for \
2121
// Parser<'a>"
2222
pub struct Parser<'a> {
2323
field: <Wrapper<Inner<'a, u8>> as MyTrait>::Output

src/test/rustdoc/issue-60726.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ where
2626
{}
2727

2828
// @has issue_60726/struct.IntoIter.html
29-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> !Send for \
29+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
3030
// IntoIter<T>"
31-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> !Sync for \
31+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Sync for \
3232
// IntoIter<T>"
3333
pub struct IntoIter<T>{
3434
hello:DynTrait<FooInterface<T>>,
+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"]' 0
5+
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 5
66
pub struct Foo<T> {
77
field: T,
88
}

src/test/rustdoc/synthetic_auto/complex.rs

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

2222
// @has complex/struct.NotOuter.html
23-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<'a, T, K: \
23+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'a, T, K: \
2424
// ?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

src/test/rustdoc/synthetic_auto/lifetimes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ where
99
{}
1010

1111
// @has lifetimes/struct.Foo.html
12-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<'c, K> Send \
12+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Send \
1313
// 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 \
15+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Sync \
1616
// for Foo<'c, K> where K: Sync"
1717
pub struct Foo<'c, K: 'c> {
1818
inner_field: Inner<'c, K>,

src/test/rustdoc/synthetic_auto/manual.rs

+4-4
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 \
2+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' 'impl<T> Sync for \
33
// Foo<T> where T: Sync'
44
//
5-
// @has - '//*[@id="trait-implementations-list"]/*[@class="impl"]//code' \
5+
// @has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//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"]' 1
9+
// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 4
1010
pub struct Foo<T> {
1111
field: T,
1212
}

src/test/rustdoc/synthetic_auto/negative.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ 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 \
6+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> !Send for \
77
// Outer<T>"
88
//
9-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> \
9+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> \
1010
// !Sync for Outer<T>"
1111
pub struct Outer<T: Copy> {
1212
inner_field: Inner<T>,

src/test/rustdoc/synthetic_auto/nested.rs

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

1111
// @has nested/struct.Foo.html
12-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' 'impl<T> Send for \
12+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' 'impl<T> Send for \
1313
// Foo<T> where T: Copy'
1414
//
15-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' \
15+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' \
1616
// 'impl<T> Sync for Foo<T> where T: Sync'
1717
pub struct Foo<T> {
1818
inner_field: Inner<T>,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ where
99
}
1010

1111
// @has no_redundancy/struct.Outer.html
12-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> Send for \
12+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> Send for \
1313
// Outer<T> where T: Copy + Send"
1414
pub struct Outer<T> {
1515
inner_field: Inner<T>,

src/test/rustdoc/synthetic_auto/project.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ where
2323
}
2424

2525
// @has project/struct.Foo.html
26-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<'c, K> Send \
26+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Send \
2727
// for Foo<'c, K> where K: MyTrait<MyItem = bool>, 'c: 'static"
2828
//
29-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<'c, K> Sync \
29+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<'c, K> Sync \
3030
// for Foo<'c, K> where K: MyTrait, <K as MyTrait>::MyItem: OtherTrait, 'c: 'static,"
3131
pub struct Foo<'c, K: 'c> {
3232
inner_field: Inner<'c, K>,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl<T> Pattern for Wrapper<T> {
2323

2424

2525
// @has self_referential/struct.WriteAndThen.html
26-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<P1> Send for \
26+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<P1> Send for \
2727
// 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
@@ -3,7 +3,7 @@ pub trait OwnedTrait<'a> {
33
}
44

55
// @has static_region/struct.Owned.html
6-
// @has - '//*[@id="synthetic-implementations-list"]/*[@class="impl"]//code' "impl<T> Send for \
6+
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//code' "impl<T> Send for \
77
// 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,

0 commit comments

Comments
 (0)