forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's a lot of snapshots, but it's quite hard to test this sort of formatting with other ways.
- Loading branch information
Showing
7 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<section id="associatedtype.F" class="associatedtype trait-impl"><a href="#associatedtype.F" class="anchor">§</a><h4 class="code-header">type <a href="trait.Tr.html#associatedtype.F" class="associatedtype">F</a><T> = T | ||
<span class="where">where | ||
T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span></h4></section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<section id="associatedtype.F" class="method"><a class="srclink rightside" href="../../src/foo/issue-112901-where-clause.rs.html#28-30">source</a><h4 class="code-header">type <a href="#associatedtype.F" class="associatedtype">F</a><T> | ||
<span class="where">where | ||
T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span></h4></section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<pre class="rust item-decl"><code>pub trait Tr { | ||
type <a href="#associatedtype.F" class="associatedtype">F</a><T> | ||
<span class="where">where | ||
T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>; | ||
}</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<section id="associatedtype.F-1" class="associatedtype trait-impl"><a href="#associatedtype.F-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.F" class="associatedtype">F</a><T> = T | ||
<span class="where">where | ||
T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span></h4></section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#![crate_name = "foo"] | ||
#![feature(trivial_bounds)] | ||
|
||
pub mod structs { | ||
// @has foo/structs/struct.A.html | ||
// @snapshot structs-A - '//pre[@class="rust item-decl"]' | ||
pub struct A<T>(T) | ||
where | ||
T: Copy; | ||
|
||
// @has foo/structs/struct.S.html | ||
// @snapshot structs-S - '//pre[@class="rust item-decl"]' | ||
pub struct S | ||
where | ||
String: Clone; | ||
} | ||
|
||
pub mod assoc { | ||
// @has foo/assoc/struct.S.html | ||
// @snapshot assoc-S-impl-F - '//section[@id="associatedtype.F"]' | ||
pub struct S; | ||
|
||
// @has foo/assoc/trait.Tr.html | ||
// @snapshot assoc-Tr-decl - '//pre[@class="rust item-decl"]' | ||
// @snapshot assoc-Tr-F - '//section[@id="associatedtype.F"]' | ||
// @snapshot assoc-Tr-impl-F - '//section[@id="associatedtype.F-1"]' | ||
pub trait Tr { | ||
type F<T> | ||
where | ||
T: Clone; | ||
} | ||
|
||
impl Tr for S { | ||
type F<T> = T where T: Clone; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<pre class="rust item-decl"><code>pub struct A<T>(_) | ||
<span class="where">where | ||
T: <a class="trait" href="{{channel}}/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a></span>;</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<pre class="rust item-decl"><code>pub struct S | ||
<span class="where">where | ||
<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>;</code></pre> |