Skip to content

Commit 8e6cf7d

Browse files
committed
rustdoc: update test cases for changed item-decl HTML
1 parent 9457380 commit 8e6cf7d

25 files changed

+72
-72
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test ensures that the docblock elements have the appropriate left margin.
22
goto: file://|DOC_PATH|/test_docs/fn.foo.html
33
// The top docblock elements shouldn't have left margin...
4-
assert-css: ("#main-content .docblock.item-decl", {"margin-left": "0px"})
4+
assert-css: ("#main-content .item-decl", {"margin-left": "0px"})
55
// ... but all the others should!
6-
assert-css: ("#main-content .docblock:not(.item-decl)", {"margin-left": "24px"})
6+
assert-css: ("#main-content .docblock", {"margin-left": "24px"})

src/test/rustdoc-gui/font-weight.goml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test checks that the font weight is correctly applied.
22
goto: file://|DOC_PATH|/lib2/struct.Foo.html
3-
assert-css: ("//*[@class='docblock item-decl']//a[text()='Alias']", {"font-weight": "400"})
3+
assert-css: ("//*[@class='item-decl']//a[text()='Alias']", {"font-weight": "400"})
44
assert-css: (
55
"//*[@class='structfield small-section-header']//a[text()='Alias']",
66
{"font-weight": "400"},
@@ -19,7 +19,7 @@ goto: file://|DOC_PATH|/lib2/trait.Trait.html
1919

2020
// This is a complex selector, so here's how it works:
2121
//
22-
// * //*[@class='docblock item-decl'] — selects element of any tag with classes docblock and item-decl
22+
// * //*[@class='item-decl'] — selects element of any tag with classes docblock and item-decl
2323
// * /pre[@class='rust trait'] — selects immediate child with tag pre and classes rust and trait
2424
// * /code — selects immediate child with tag code
2525
// * /a[@class='constant'] — selects immediate child with tag a and class constant
@@ -29,11 +29,11 @@ goto: file://|DOC_PATH|/lib2/trait.Trait.html
2929
// This uses '/parent::*' as a proxy for the style of the text node.
3030
// We can't just select the '<a>' because intermediate tags could be added.
3131
assert-count: (
32-
"//*[@class='docblock item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*",
32+
"//*[@class='item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*",
3333
1,
3434
)
3535
assert-css: (
36-
"//*[@class='docblock item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*",
36+
"//*[@class='item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*",
3737
{"font-weight": "400"},
3838
)
3939

src/test/rustdoc-gui/item-info-overflow.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ goto: file://|DOC_PATH|/lib2/struct.LongItemInfo.html
33
// We set a fixed size so there is no chance of "random" resize.
44
size: (1200, 870)
55
// Logically, the "item-decl" and the "item-info" should have the same scroll width.
6-
compare-elements-property: (".docblock.item-decl", ".item-info", ["scrollWidth"])
6+
compare-elements-property: (".item-decl", ".item-info", ["scrollWidth"])
77
assert-property: (".item-info", {"scrollWidth": "890"})
88
// Just to be sure we're comparing the correct "item-info":
99
assert-text: (
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![crate_name = "foo"]
22

33
// @has 'foo/fn.f.html'
4-
// @has - //*[@'class="docblock item-decl"]' '#[export_name = "f"] pub fn f()'
4+
// @has - //*[@'class="item-decl"]' '#[export_name = "f"] pub fn f()'
55
#[export_name = "\
66
f"]
77
pub fn f() {}

src/test/rustdoc/attributes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ pub extern "C" fn f() {}
88
#[export_name = "bar"]
99
pub extern "C" fn g() {}
1010

11-
// @has foo/struct.Repr.html '//*[@class="docblock item-decl"]' '#[repr(C, align(8))]'
11+
// @has foo/struct.Repr.html '//*[@class="item-decl"]' '#[repr(C, align(8))]'
1212
#[repr(C, align(8))]
1313
pub struct Repr;
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![crate_name = "foo"]
22

33
// @has 'foo/constant.HOUR_IN_SECONDS.html'
4-
// @has - '//*[@class="docblock item-decl"]//code' 'pub const HOUR_IN_SECONDS: u64 = _; // 3_600u64'
4+
// @has - '//*[@class="item-decl"]//code' 'pub const HOUR_IN_SECONDS: u64 = _; // 3_600u64'
55
pub const HOUR_IN_SECONDS: u64 = 60 * 60;
66

77
// @has 'foo/constant.NEGATIVE.html'
8-
// @has - '//*[@class="docblock item-decl"]//code' 'pub const NEGATIVE: i64 = _; // -3_600i64'
8+
// @has - '//*[@class="item-decl"]//code' 'pub const NEGATIVE: i64 = _; // -3_600i64'
99
pub const NEGATIVE: i64 = -60 * 60;

src/test/rustdoc/decl-trailing-whitespace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub struct Error;
77
// @has 'foo/trait.Write.html'
88

99
pub trait Write {
10-
// @snapshot 'declaration' - '//*[@class="docblock item-decl"]//code'
10+
// @snapshot 'declaration' - '//*[@class="item-decl"]//code'
1111
fn poll_write(
1212
self: Option<String>,
1313
cx: &mut Option<String>,

src/test/rustdoc/macro-higher-kinded-function.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ macro_rules! gen {
1111
}
1212

1313
// @has 'foo/struct.Providers.html'
14-
// @has - '//*[@class="docblock item-decl"]//code' "pub a: for<'tcx> fn(_: TyCtxt<'tcx>, _: u8) -> i8,"
15-
// @has - '//*[@class="docblock item-decl"]//code' "pub b: for<'tcx> fn(_: TyCtxt<'tcx>, _: u16) -> i16,"
14+
// @has - '//*[@class="item-decl"]//code' "pub a: for<'tcx> fn(_: TyCtxt<'tcx>, _: u8) -> i8,"
15+
// @has - '//*[@class="item-decl"]//code' "pub b: for<'tcx> fn(_: TyCtxt<'tcx>, _: u16) -> i16,"
1616
// @has - '//*[@id="structfield.a"]/code' "a: for<'tcx> fn(_: TyCtxt<'tcx>, _: u8) -> i8"
1717
// @has - '//*[@id="structfield.b"]/code' "b: for<'tcx> fn(_: TyCtxt<'tcx>, _: u16) -> i16"
1818
gen! {

src/test/rustdoc/reexport-dep-foreign-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
extern crate all_item_types;
99

1010
// @has 'foo/fn.foo_ffn.html'
11-
// @has - '//*[@class="docblock item-decl"]//code' 'pub unsafe extern "C" fn foo_ffn()'
11+
// @has - '//*[@class="item-decl"]//code' 'pub unsafe extern "C" fn foo_ffn()'
1212
pub use all_item_types::foo_ffn;

src/test/rustdoc/reexports-priv.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
extern crate reexports;
77

8-
// @has 'foo/macro.addr_of.html' '//*[@class="docblock item-decl"]' 'pub macro addr_of($place:expr) {'
8+
// @has 'foo/macro.addr_of.html' '//*[@class="item-decl"]' 'pub macro addr_of($place:expr) {'
99
pub use reexports::addr_of;
1010
// @!has 'foo/macro.addr_of_crate.html'
1111
pub(crate) use reexports::addr_of_crate;
@@ -14,7 +14,7 @@ pub(self) use reexports::addr_of_self;
1414
// @!has 'foo/macro.addr_of_local.html'
1515
use reexports::addr_of_local;
1616

17-
// @has 'foo/struct.Foo.html' '//*[@class="docblock item-decl"]' 'pub struct Foo;'
17+
// @has 'foo/struct.Foo.html' '//*[@class="item-decl"]' 'pub struct Foo;'
1818
pub use reexports::Foo;
1919
// @!has 'foo/struct.FooCrate.html'
2020
pub(crate) use reexports::FooCrate;
@@ -23,7 +23,7 @@ pub(self) use reexports::FooSelf;
2323
// @!has 'foo/struct.FooLocal.html'
2424
use reexports::FooLocal;
2525

26-
// @has 'foo/enum.Bar.html' '//*[@class="docblock item-decl"]' 'pub enum Bar {'
26+
// @has 'foo/enum.Bar.html' '//*[@class="item-decl"]' 'pub enum Bar {'
2727
pub use reexports::Bar;
2828
// @!has 'foo/enum.BarCrate.html'
2929
pub(crate) use reexports::BarCrate;
@@ -50,7 +50,7 @@ pub(self) use reexports::TypeSelf;
5050
// @!has 'foo/type.TypeLocal.html'
5151
use reexports::TypeLocal;
5252

53-
// @has 'foo/union.Union.html' '//*[@class="docblock item-decl"]' 'pub union Union {'
53+
// @has 'foo/union.Union.html' '//*[@class="item-decl"]' 'pub union Union {'
5454
pub use reexports::Union;
5555
// @!has 'foo/union.UnionCrate.html'
5656
pub(crate) use reexports::UnionCrate;
@@ -61,33 +61,33 @@ use reexports::UnionLocal;
6161

6262
pub mod outer {
6363
pub mod inner {
64-
// @has 'foo/outer/inner/macro.addr_of.html' '//*[@class="docblock item-decl"]' 'pub macro addr_of($place:expr) {'
64+
// @has 'foo/outer/inner/macro.addr_of.html' '//*[@class="item-decl"]' 'pub macro addr_of($place:expr) {'
6565
pub use reexports::addr_of;
66-
// @has 'foo/outer/inner/macro.addr_of_crate.html' '//*[@class="docblock item-decl"]' 'pub(crate) macro addr_of_crate($place:expr) {'
66+
// @has 'foo/outer/inner/macro.addr_of_crate.html' '//*[@class="item-decl"]' 'pub(crate) macro addr_of_crate($place:expr) {'
6767
pub(crate) use reexports::addr_of_crate;
68-
// @has 'foo/outer/inner/macro.addr_of_super.html' '//*[@class="docblock item-decl"]' 'pub(in outer) macro addr_of_super($place:expr) {'
68+
// @has 'foo/outer/inner/macro.addr_of_super.html' '//*[@class="item-decl"]' 'pub(in outer) macro addr_of_super($place:expr) {'
6969
pub(super) use reexports::addr_of_super;
7070
// @!has 'foo/outer/inner/macro.addr_of_self.html'
7171
pub(self) use reexports::addr_of_self;
7272
// @!has 'foo/outer/inner/macro.addr_of_local.html'
7373
use reexports::addr_of_local;
7474

75-
// @has 'foo/outer/inner/struct.Foo.html' '//*[@class="docblock item-decl"]' 'pub struct Foo;'
75+
// @has 'foo/outer/inner/struct.Foo.html' '//*[@class="item-decl"]' 'pub struct Foo;'
7676
pub use reexports::Foo;
77-
// @has 'foo/outer/inner/struct.FooCrate.html' '//*[@class="docblock item-decl"]' 'pub(crate) struct FooCrate;'
77+
// @has 'foo/outer/inner/struct.FooCrate.html' '//*[@class="item-decl"]' 'pub(crate) struct FooCrate;'
7878
pub(crate) use reexports::FooCrate;
79-
// @has 'foo/outer/inner/struct.FooSuper.html' '//*[@class="docblock item-decl"]' 'pub(in outer) struct FooSuper;'
79+
// @has 'foo/outer/inner/struct.FooSuper.html' '//*[@class="item-decl"]' 'pub(in outer) struct FooSuper;'
8080
pub(super) use reexports::FooSuper;
8181
// @!has 'foo/outer/inner/struct.FooSelf.html'
8282
pub(self) use reexports::FooSelf;
8383
// @!has 'foo/outer/inner/struct.FooLocal.html'
8484
use reexports::FooLocal;
8585

86-
// @has 'foo/outer/inner/enum.Bar.html' '//*[@class="docblock item-decl"]' 'pub enum Bar {'
86+
// @has 'foo/outer/inner/enum.Bar.html' '//*[@class="item-decl"]' 'pub enum Bar {'
8787
pub use reexports::Bar;
88-
// @has 'foo/outer/inner/enum.BarCrate.html' '//*[@class="docblock item-decl"]' 'pub(crate) enum BarCrate {'
88+
// @has 'foo/outer/inner/enum.BarCrate.html' '//*[@class="item-decl"]' 'pub(crate) enum BarCrate {'
8989
pub(crate) use reexports::BarCrate;
90-
// @has 'foo/outer/inner/enum.BarSuper.html' '//*[@class="docblock item-decl"]' 'pub(in outer) enum BarSuper {'
90+
// @has 'foo/outer/inner/enum.BarSuper.html' '//*[@class="item-decl"]' 'pub(in outer) enum BarSuper {'
9191
pub(super) use reexports::BarSuper;
9292
// @!has 'foo/outer/inner/enum.BarSelf.html'
9393
pub(self) use reexports::BarSelf;
@@ -116,11 +116,11 @@ pub mod outer {
116116
// @!has 'foo/outer/inner/type.TypeLocal.html'
117117
use reexports::TypeLocal;
118118

119-
// @has 'foo/outer/inner/union.Union.html' '//*[@class="docblock item-decl"]' 'pub union Union {'
119+
// @has 'foo/outer/inner/union.Union.html' '//*[@class="item-decl"]' 'pub union Union {'
120120
pub use reexports::Union;
121-
// @has 'foo/outer/inner/union.UnionCrate.html' '//*[@class="docblock item-decl"]' 'pub(crate) union UnionCrate {'
121+
// @has 'foo/outer/inner/union.UnionCrate.html' '//*[@class="item-decl"]' 'pub(crate) union UnionCrate {'
122122
pub(crate) use reexports::UnionCrate;
123-
// @has 'foo/outer/inner/union.UnionSuper.html' '//*[@class="docblock item-decl"]' 'pub(in outer) union UnionSuper {'
123+
// @has 'foo/outer/inner/union.UnionSuper.html' '//*[@class="item-decl"]' 'pub(in outer) union UnionSuper {'
124124
pub(super) use reexports::UnionSuper;
125125
// @!has 'foo/outer/inner/union.UnionSelf.html'
126126
pub(self) use reexports::UnionSelf;

src/test/rustdoc/reexports.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
extern crate reexports;
66

7-
// @has 'foo/macro.addr_of.html' '//*[@class="docblock item-decl"]' 'pub macro addr_of($place:expr) {'
7+
// @has 'foo/macro.addr_of.html' '//*[@class="item-decl"]' 'pub macro addr_of($place:expr) {'
88
pub use reexports::addr_of;
99
// @!has 'foo/macro.addr_of_crate.html'
1010
pub(crate) use reexports::addr_of_crate;
@@ -13,7 +13,7 @@ pub(self) use reexports::addr_of_self;
1313
// @!has 'foo/macro.addr_of_local.html'
1414
use reexports::addr_of_local;
1515

16-
// @has 'foo/struct.Foo.html' '//*[@class="docblock item-decl"]' 'pub struct Foo;'
16+
// @has 'foo/struct.Foo.html' '//*[@class="item-decl"]' 'pub struct Foo;'
1717
pub use reexports::Foo;
1818
// @!has 'foo/struct.FooCrate.html'
1919
pub(crate) use reexports::FooCrate;
@@ -22,7 +22,7 @@ pub(self) use reexports::FooSelf;
2222
// @!has 'foo/struct.FooLocal.html'
2323
use reexports::FooLocal;
2424

25-
// @has 'foo/enum.Bar.html' '//*[@class="docblock item-decl"]' 'pub enum Bar {'
25+
// @has 'foo/enum.Bar.html' '//*[@class="item-decl"]' 'pub enum Bar {'
2626
pub use reexports::Bar;
2727
// @!has 'foo/enum.BarCrate.html'
2828
pub(crate) use reexports::BarCrate;
@@ -49,7 +49,7 @@ pub(self) use reexports::TypeSelf;
4949
// @!has 'foo/type.TypeLocal.html'
5050
use reexports::TypeLocal;
5151

52-
// @has 'foo/union.Union.html' '//*[@class="docblock item-decl"]' 'pub union Union {'
52+
// @has 'foo/union.Union.html' '//*[@class="item-decl"]' 'pub union Union {'
5353
pub use reexports::Union;
5454
// @!has 'foo/union.UnionCrate.html'
5555
pub(crate) use reexports::UnionCrate;
@@ -60,7 +60,7 @@ use reexports::UnionLocal;
6060

6161
pub mod outer {
6262
pub mod inner {
63-
// @has 'foo/outer/inner/macro.addr_of.html' '//*[@class="docblock item-decl"]' 'pub macro addr_of($place:expr) {'
63+
// @has 'foo/outer/inner/macro.addr_of.html' '//*[@class="item-decl"]' 'pub macro addr_of($place:expr) {'
6464
pub use reexports::addr_of;
6565
// @!has 'foo/outer/inner/macro.addr_of_crate.html'
6666
pub(crate) use reexports::addr_of_crate;
@@ -71,7 +71,7 @@ pub mod outer {
7171
// @!has 'foo/outer/inner/macro.addr_of_local.html'
7272
use reexports::addr_of_local;
7373

74-
// @has 'foo/outer/inner/struct.Foo.html' '//*[@class="docblock item-decl"]' 'pub struct Foo;'
74+
// @has 'foo/outer/inner/struct.Foo.html' '//*[@class="item-decl"]' 'pub struct Foo;'
7575
pub use reexports::Foo;
7676
// @!has 'foo/outer/inner/struct.FooCrate.html'
7777
pub(crate) use reexports::FooCrate;
@@ -82,7 +82,7 @@ pub mod outer {
8282
// @!has 'foo/outer/inner/struct.FooLocal.html'
8383
use reexports::FooLocal;
8484

85-
// @has 'foo/outer/inner/enum.Bar.html' '//*[@class="docblock item-decl"]' 'pub enum Bar {'
85+
// @has 'foo/outer/inner/enum.Bar.html' '//*[@class="item-decl"]' 'pub enum Bar {'
8686
pub use reexports::Bar;
8787
// @!has 'foo/outer/inner/enum.BarCrate.html'
8888
pub(crate) use reexports::BarCrate;
@@ -115,7 +115,7 @@ pub mod outer {
115115
// @!has 'foo/outer/inner/type.TypeLocal.html'
116116
use reexports::TypeLocal;
117117

118-
// @has 'foo/outer/inner/union.Union.html' '//*[@class="docblock item-decl"]' 'pub union Union {'
118+
// @has 'foo/outer/inner/union.Union.html' '//*[@class="item-decl"]' 'pub union Union {'
119119
pub use reexports::Union;
120120
// @!has 'foo/outer/inner/union.UnionCrate.html'
121121
pub(crate) use reexports::UnionCrate;

src/test/rustdoc/toggle-item-contents.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub union Union {
5555

5656
// @has 'toggle_item_contents/struct.PrivStruct.html'
5757
// @count - '//details[@class="rustdoc-toggle type-contents-toggle"]' 0
58-
// @has - '//div[@class="docblock item-decl"]' '/* private fields */'
58+
// @has - '//div[@class="item-decl"]' '/* private fields */'
5959
pub struct PrivStruct {
6060
a: usize,
6161
b: usize,

src/test/rustdoc/trait_alias.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ use std::fmt::Debug;
1414
// @has foo/index.html '//a[@class="traitalias"]' 'Foo'
1515

1616
// @has foo/traitalias.CopyAlias.html
17-
// @has - '//section[@id="main-content"]/div[@class="docblock item-decl"]/pre' 'trait CopyAlias = Copy;'
17+
// @has - '//section[@id="main-content"]/div[@class="item-decl"]/pre' 'trait CopyAlias = Copy;'
1818
pub trait CopyAlias = Copy;
1919
// @has foo/traitalias.Alias2.html
20-
// @has - '//section[@id="main-content"]/div[@class="docblock item-decl"]/pre' 'trait Alias2 = Copy + Debug;'
20+
// @has - '//section[@id="main-content"]/div[@class="item-decl"]/pre' 'trait Alias2 = Copy + Debug;'
2121
pub trait Alias2 = Copy + Debug;
2222
// @has foo/traitalias.Foo.html
23-
// @has - '//section[@id="main-content"]/div[@class="docblock item-decl"]/pre' 'trait Foo<T> = Into<T> + Debug;'
23+
// @has - '//section[@id="main-content"]/div[@class="item-decl"]/pre' 'trait Foo<T> = Into<T> + Debug;'
2424
pub trait Foo<T> = Into<T> + Debug;
2525
// @has foo/fn.bar.html '//a[@href="traitalias.Alias2.html"]' 'Alias2'
2626
pub fn bar<T>() where T: Alias2 {}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div class="docblock item-decl"><pre class="rust struct"><code>pub struct Simd&lt;T&gt;(_) <br /><span class="where">where<br />&#160;&#160;&#160;&#160;T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre></div>
1+
<div class="item-decl"><pre class="rust struct"><code>pub struct Simd&lt;T&gt;(_)<br /><span class="where">where<br />&#160;&#160;&#160;&#160;T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre></div>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<div class="docblock item-decl"><pre class="rust trait"><code>pub trait TraitWhere {
2-
type <a href="#associatedtype.Item" class="associatedtype">Item</a>&lt;'a&gt;<br />&#160;&#160;&#160; <span class="where">where<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Self: 'a</span>;
1+
<div class="item-decl"><pre class="rust trait"><code>pub trait TraitWhere {
2+
type <a href="#associatedtype.Item" class="associatedtype">Item</a>&lt;'a&gt;<br />&#160;&#160;&#160;<span class="where">where<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Self: 'a</span>;
33
}</code></pre></div>

src/test/rustdoc/where.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ impl<D> Delta<D> where D: MyTrait {
2020
pub struct Echo<E>(E);
2121

2222
// @has 'foo/struct.Simd.html'
23-
// @snapshot SWhere_Simd_item-decl - '//div[@class="docblock item-decl"]'
23+
// @snapshot SWhere_Simd_item-decl - '//div[@class="item-decl"]'
2424
pub struct Simd<T>([T; 1])
2525
where
2626
T: MyTrait;
2727

2828
// @has 'foo/trait.TraitWhere.html'
29-
// @snapshot SWhere_TraitWhere_item-decl - '//div[@class="docblock item-decl"]'
29+
// @snapshot SWhere_TraitWhere_item-decl - '//div[@class="item-decl"]'
3030
pub trait TraitWhere {
3131
type Item<'a> where Self: 'a;
3232
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="docblock item-decl"><pre class="rust enum"><code>pub enum Cow&lt;'a, B:&#160;?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a&gt; <span class="where fmt-newline">where<br />&#160;&#160;&#160;&#160;B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt;,&#160;</span>{
1+
<div class="item-decl"><pre class="rust enum"><code>pub enum Cow&lt;'a, B:&#160;?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a&gt;<span class="where fmt-newline">where<br />&#160;&#160;&#160;&#160;B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt;,</span>{
22
Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a </a>B),
33
Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
4-
}</code></pre></div>
4+
}</code></pre></div>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="docblock item-decl"><pre class="rust enum"><code>pub enum Cow2&lt;'a, B:&#160;?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + 'a&gt; {
1+
<div class="item-decl"><pre class="rust enum"><code>pub enum Cow2&lt;'a, B:&#160;?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + 'a&gt; {
22
Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a </a>B),
33
Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
4-
}</code></pre></div>
4+
}</code></pre></div>

0 commit comments

Comments
 (0)