Skip to content

Commit 9bf30eb

Browse files
committed
Auto merge of rust-lang#118493 - TaKO8Ki:rollup-jfkdbyo, r=TaKO8Ki
Rollup of 3 pull requests Successful merges: - rust-lang#118483 (rustdoc: `div.where` instead of fmt-newline class) - rust-lang#118486 (generic_const_exprs: suggest to add the feature, not use it) - rust-lang#118489 (Wesley is on vacation) r? `@ghost` `@rustbot` modify labels: rollup
2 parents a1c65db + 65026fa commit 9bf30eb

File tree

54 files changed

+116
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+116
-124
lines changed

compiler/rustc_resolve/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ resolve_param_in_non_trivial_anon_const =
200200
.label = cannot perform const operation using `{$name}`
201201
202202
resolve_param_in_non_trivial_anon_const_help =
203-
use `#![feature(generic_const_exprs)]` to allow generic const expressions
203+
add `#![feature(generic_const_exprs)]` to allow generic const expressions
204204
205205
resolve_param_in_ty_of_const_param =
206206
the type of const parameters must not depend on other generic parameters

src/librustdoc/html/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ pub(crate) fn print_where_clause<'a, 'tcx: 'a>(
367367

368368
if ending == Ending::Newline {
369369
let mut clause = " ".repeat(indent.saturating_sub(1));
370-
write!(clause, "<span class=\"where fmt-newline\">where{where_preds},</span>")?;
370+
write!(clause, "<div class=\"where\">where{where_preds},</div>")?;
371371
clause
372372
} else {
373373
// insert a newline after a single space but before multiple spaces at the start

src/librustdoc/html/render/mod.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -1441,15 +1441,10 @@ fn notable_traits_decl(ty: &clean::Type, cx: &Context<'_>) -> (String, String) {
14411441
);
14421442
}
14431443

1444-
//use the "where" class here to make it small
1445-
write!(
1446-
&mut out,
1447-
"<span class=\"where fmt-newline\">{}</span>",
1448-
impl_.print(false, cx)
1449-
);
1444+
write!(&mut out, "<div class=\"where\">{}</div>", impl_.print(false, cx));
14501445
for it in &impl_.items {
14511446
if let clean::AssocTypeItem(ref tydef, ref _bounds) = *it.kind {
1452-
out.push_str("<span class=\"where fmt-newline\"> ");
1447+
out.push_str("<div class=\"where\"> ");
14531448
let empty_set = FxHashSet::default();
14541449
let src_link = AssocItemLink::GotoSource(trait_did.into(), &empty_set);
14551450
assoc_type(
@@ -1462,7 +1457,7 @@ fn notable_traits_decl(ty: &clean::Type, cx: &Context<'_>) -> (String, String) {
14621457
0,
14631458
cx,
14641459
);
1465-
out.push_str(";</span>");
1460+
out.push_str(";</div>");
14661461
}
14671462
}
14681463
}
@@ -1948,7 +1943,7 @@ pub(crate) fn render_impl_summary(
19481943
if show_def_docs {
19491944
for it in &inner_impl.items {
19501945
if let clean::AssocTypeItem(ref tydef, ref _bounds) = *it.kind {
1951-
w.write_str("<span class=\"where fmt-newline\"> ");
1946+
w.write_str("<div class=\"where\"> ");
19521947
assoc_type(
19531948
w,
19541949
it,
@@ -1959,7 +1954,7 @@ pub(crate) fn render_impl_summary(
19591954
0,
19601955
cx,
19611956
);
1962-
w.write_str(";</span>");
1957+
w.write_str(";</div>");
19631958
}
19641959
}
19651960
}

src/librustdoc/html/static/css/rustdoc.css

+2-5
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,8 @@ pre, .rustdoc.src .example-wrap {
703703
background: var(--table-alt-row-background-color);
704704
}
705705

706-
/* Shift "where ..." part of method or fn definition down a line */
707-
.method .where,
708-
.fn .where,
709-
.where.fmt-newline {
710-
display: block;
706+
/* "where ..." clauses with block display are also smaller */
707+
div.where {
711708
white-space: pre-wrap;
712709
font-size: 0.875rem;
713710
}

tests/rustdoc-gui/where-whitespace.goml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ go-to: "file://" + |DOC_PATH| + "/lib2/trait.Whitespace.html"
33
show-text: true
44
// First, we check in the trait definition if the where clause is "on its own" (not on the same
55
// line than "pub trait Whitespace<Idx>").
6-
compare-elements-position-false: (".item-decl code", ".where.fmt-newline", ("y"))
6+
compare-elements-position-false: (".item-decl code", "div.where", ("y"))
77
// And that the code following it isn't on the same line either.
8-
compare-elements-position-false: (".item-decl .fn", ".where.fmt-newline", ("y"))
8+
compare-elements-position-false: (".item-decl .fn", "div.where", ("y"))
99

1010
go-to: "file://" + |DOC_PATH| + "/lib2/struct.WhereWhitespace.html"
1111
// We make the screen a bit wider to ensure that the trait impl is on one line.
1212
set-window-size: (915, 915)
1313

14-
compare-elements-position-false: ("#method\.new .fn", "#method\.new .where.fmt-newline", ("y"))
14+
compare-elements-position-false: ("#method\.new .fn", "#method\.new div.where", ("y"))
1515
// We ensure that both the trait name and the struct name are on the same line in
1616
// "impl<K, T> Whitespace<&K> for WhereWhitespace<T>".
1717
compare-elements-position: (
@@ -22,6 +22,6 @@ compare-elements-position: (
2222
// And we now check that the where condition isn't on the same line.
2323
compare-elements-position-false: (
2424
"#trait-implementations-list .impl h3 .trait",
25-
"#trait-implementations-list .impl h3 .where.fmt-newline",
25+
"#trait-implementations-list .impl h3 div.where",
2626
("y"),
2727
)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/span&gt;"}</script>
1+
<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/div&gt;"}</script>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/span&gt;"}</script>
1+
<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/div&gt;"}</script>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/span&gt;","Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/span&gt;"}</script>
1+
<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/div&gt;","Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/div&gt;"}</script>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<script type="text/json" id="notable-traits-data">{"Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/span&gt;"}</script>
1+
<script type="text/json" id="notable-traits-data">{"Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/div&gt;"}</script>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<script type="text/json" id="notable-traits-data">{"Odd":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/span&gt;&lt;span class=\"where fmt-newline\"&gt; type &lt;a href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\"&gt;Item&lt;/a&gt; = &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.usize.html\"&gt;usize&lt;/a&gt;;&lt;/span&gt;"}</script>
1+
<script type="text/json" id="notable-traits-data">{"Odd":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/div&gt;&lt;div class=\"where\"&gt; type &lt;a href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\"&gt;Item&lt;/a&gt; = &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.usize.html\"&gt;usize&lt;/a&gt;;&lt;/div&gt;"}</script>

tests/rustdoc/rfc-2632-const-trait-impl.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub trait Tr<T> {
2323
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]' '~const'
2424
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn'
2525
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const'
26-
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
26+
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/div[@class="where"]' ': Fn'
2727
fn a<A: /* ~const */ Fn() + ~const Destruct>()
2828
where
2929
Option<A>: /* ~const */ Fn() + ~const Destruct,
@@ -35,7 +35,7 @@ pub trait Tr<T> {
3535
// @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]' '~const'
3636
// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/a[@class="trait"]' 'Fn'
3737
// @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '~const'
38-
// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
38+
// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/div[@class="where"]' ': Fn'
3939
impl<T: /* ~const */ Fn() + ~const Destruct> const Tr<T> for T
4040
where
4141
Option<T>: /* ~const */ Fn() + ~const Destruct,
@@ -49,8 +49,8 @@ where
4949

5050
// @!has foo/fn.foo.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '~const'
5151
// @has - '//pre[@class="rust item-decl"]/code/a[@class="trait"]' 'Fn'
52-
// @!has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' '~const'
53-
// @has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' ': Fn'
52+
// @!has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' '~const'
53+
// @has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' ': Fn'
5454
pub const fn foo<F: /* ~const */ Fn() + ~const Destruct>()
5555
where
5656
Option<F>: /* ~const */ Fn() + ~const Destruct,
@@ -62,7 +62,7 @@ impl<T> S<T> {
6262
// @!has foo/struct.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '~const'
6363
// @has - '//section[@id="method.foo"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn'
6464
// @!has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '~const'
65-
// @has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
65+
// @has - '//section[@id="method.foo"]/h4[@class="code-header"]/div[@class="where"]' ': Fn'
6666
pub const fn foo<B, C: /* ~const */ Fn() + ~const Destruct>()
6767
where
6868
B: /* ~const */ Fn() + ~const Destruct,

tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ pub struct Pair<A, B> {
1313
// @count - '//*[@id="aliased-type"]' 1
1414
// @count - '//*[@id="variants"]' 0
1515
// @count - '//*[@id="fields"]' 1
16-
// @count - '//span[@class="where fmt-newline"]' 0
16+
// @count - '//div[@class="where"]' 0
1717
pub type ReversedTypesPair<Q, R> = Pair<R, Q>;
1818

1919
// @has 'inner_types_lazy/type.ReadWrite.html'
2020
// @count - '//*[@id="aliased-type"]' 1
2121
// @count - '//*[@id="variants"]' 0
2222
// @count - '//*[@id="fields"]' 1
23-
// @count - '//span[@class="where fmt-newline"]' 2
23+
// @count - '//div[@class="where"]' 2
2424
pub type ReadWrite<R, W> = Pair<R, W>
2525
where
2626
R: std::io::Read,
@@ -30,5 +30,5 @@ where
3030
// @count - '//*[@id="aliased-type"]' 1
3131
// @count - '//*[@id="variants"]' 0
3232
// @count - '//*[@id="fields"]' 1
33-
// @count - '//span[@class="where fmt-newline"]' 0
33+
// @count - '//div[@class="where"]' 0
3434
pub type VecPair<U, V> = Pair<Vec<U>, Vec<V>>;
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<h3 class="code-header">impl&lt;D&gt; <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a>&lt;D&gt;<span class="where fmt-newline">where
2-
D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></h3>
1+
<h3 class="code-header">impl&lt;D&gt; <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a>&lt;D&gt;<div class="where">where
2+
D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div></h3>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<code>pub trait Bravo&lt;B&gt;<span class="where fmt-newline">where
2-
B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span>{
1+
<code>pub trait Bravo&lt;B&gt;<div class="where">where
2+
B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div>{
33
// Required method
44
fn <a href="#tymethod.get" class="fn">get</a>(&amp;self, B: B);
55
}</code>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<code>pub fn charlie&lt;C&gt;()<span class="where fmt-newline">where
2-
C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></code>
1+
<code>pub fn charlie&lt;C&gt;()<div class="where">where
2+
C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div></code>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<code>pub type Golf&lt;T&gt;<span class="where fmt-newline">where
2-
T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span> = <a class="primitive" href="{{channel}}/std/primitive.tuple.html">(T, T)</a>;</code>
1+
<code>pub type Golf&lt;T&gt;<div class="where">where
2+
T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div> = <a class="primitive" href="{{channel}}/std/primitive.tuple.html">(T, T)</a>;</code>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<span class="where fmt-newline">where
2-
B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
1+
<pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<div class="where">where
2+
B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
33
Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>),
44
Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
55
}</code></pre>

0 commit comments

Comments
 (0)