mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Update existing snapshot and add more snapshots of where clause indentation
This commit is contained in:
parent
9202caaec5
commit
b858a4745c
2
tests/rustdoc/where.SWhere_Echo_impl.html
Normal file
2
tests/rustdoc/where.SWhere_Echo_impl.html
Normal file
@ -0,0 +1,2 @@
|
||||
<h3 class="code-header">impl<D> <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a><D><span class="where fmt-newline">where
|
||||
D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></h3>
|
@ -1,3 +1,3 @@
|
||||
<pre class="rust item-decl"><code>pub struct Simd<T>(_)
|
||||
<span class="where">where
|
||||
T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre>
|
||||
T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre>
|
||||
|
3
tests/rustdoc/where.alpha_trait_decl.html
Normal file
3
tests/rustdoc/where.alpha_trait_decl.html
Normal file
@ -0,0 +1,3 @@
|
||||
<code>pub struct Alpha<A>(_)
|
||||
<span class="where">where
|
||||
A: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code>
|
5
tests/rustdoc/where.bravo_trait_decl.html
Normal file
5
tests/rustdoc/where.bravo_trait_decl.html
Normal file
@ -0,0 +1,5 @@
|
||||
<code>pub trait Bravo<B><span class="where fmt-newline">where
|
||||
B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span>{
|
||||
// Required method
|
||||
fn <a href="#tymethod.get" class="fn">get</a>(&self, B: B);
|
||||
}</code>
|
2
tests/rustdoc/where.charlie_fn_decl.html
Normal file
2
tests/rustdoc/where.charlie_fn_decl.html
Normal file
@ -0,0 +1,2 @@
|
||||
<code>pub fn charlie<C>()<span class="where fmt-newline">where
|
||||
C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></code>
|
2
tests/rustdoc/where.golf_type_alias_decl.html
Normal file
2
tests/rustdoc/where.golf_type_alias_decl.html
Normal file
@ -0,0 +1,2 @@
|
||||
<code>pub type Golf<T><span class="where fmt-newline">where
|
||||
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>
|
@ -5,16 +5,20 @@ use std::io::Lines;
|
||||
pub trait MyTrait { fn dummy(&self) { } }
|
||||
|
||||
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(_) where A: MyTrait"
|
||||
// @snapshot alpha_trait_decl - '//*[@class="rust item-decl"]/code'
|
||||
pub struct Alpha<A>(A) where A: MyTrait;
|
||||
// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B>where B: MyTrait"
|
||||
// @snapshot bravo_trait_decl - '//*[@class="rust item-decl"]/code'
|
||||
pub trait Bravo<B> where B: MyTrait { fn get(&self, B: B); }
|
||||
// @has foo/fn.charlie.html '//pre' "pub fn charlie<C>()where C: MyTrait"
|
||||
// @snapshot charlie_fn_decl - '//*[@class="rust item-decl"]/code'
|
||||
pub fn charlie<C>() where C: MyTrait {}
|
||||
|
||||
pub struct Delta<D>(D);
|
||||
|
||||
// @has foo/struct.Delta.html '//*[@class="impl"]//h3[@class="code-header"]' \
|
||||
// "impl<D> Delta<D>where D: MyTrait"
|
||||
// @snapshot SWhere_Echo_impl - '//*[@id="impl-Delta%3CD%3E"]/h3[@class="code-header"]'
|
||||
impl<D> Delta<D> where D: MyTrait {
|
||||
pub fn delta() {}
|
||||
}
|
||||
@ -65,4 +69,5 @@ impl<F> MyTrait for Foxtrot<F>where F: MyTrait {}
|
||||
|
||||
// @has foo/type.Golf.html '//pre[@class="rust item-decl"]' \
|
||||
// "type Golf<T>where T: Clone, = (T, T)"
|
||||
// @snapshot golf_type_alias_decl - '//*[@class="rust item-decl"]/code'
|
||||
pub type Golf<T> where T: Clone = (T, T);
|
||||
|
Loading…
Reference in New Issue
Block a user