mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Update code format and tests
This commit is contained in:
parent
b7a8f1f225
commit
617e64c9e7
@ -1483,7 +1483,7 @@ impl clean::FnDecl {
|
|||||||
|
|
||||||
if self.c_variadic {
|
if self.c_variadic {
|
||||||
match line_wrapping_indent {
|
match line_wrapping_indent {
|
||||||
None => write!(f, "...")?,
|
None => write!(f, ", ...")?,
|
||||||
Some(n) => write!(f, "{}...\n", Indent(n + 4))?,
|
Some(n) => write!(f, "{}...\n", Indent(n + 4))?,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ struct AsyncFdReadyGuard<'a, T> { x: &'a T }
|
|||||||
|
|
||||||
impl Foo {
|
impl Foo {
|
||||||
// @has async_fn/struct.Foo.html
|
// @has async_fn/struct.Foo.html
|
||||||
// @has - '//*[@class="method"]' 'pub async fn complicated_lifetimes( &self, context: &impl Bar ) -> impl Iterator<Item = &usize>'
|
// @has - '//*[@class="method"]' 'pub async fn complicated_lifetimes( &self, context: &impl Bar, ) -> impl Iterator<Item = &usize>'
|
||||||
pub async fn complicated_lifetimes(&self, context: &impl Bar) -> impl Iterator<Item = &usize> {
|
pub async fn complicated_lifetimes(&self, context: &impl Bar) -> impl Iterator<Item = &usize> {
|
||||||
[0].iter()
|
[0].iter()
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1 @@
|
|||||||
<pre class="rust item-decl"><code>pub fn create(
|
<pre class="rust item-decl"><code>pub fn create() -> <a class="struct" href="struct.Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000.html" title="struct decl_line_wrapping_empty_arg_list::Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000">Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000</a></code></pre>
|
||||||
) -> <a class="struct" href="struct.Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000.html" title="struct decl_line_wrapping_empty_arg_list::Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000">Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000</a></code></pre>
|
|
@ -3,7 +3,7 @@
|
|||||||
fn <a href="#tymethod.poll_write" class="fn">poll_write</a>(
|
fn <a href="#tymethod.poll_write" class="fn">poll_write</a>(
|
||||||
self,
|
self,
|
||||||
cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
||||||
buf: &mut [<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>]
|
buf: &mut [<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>],
|
||||||
) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>>;
|
) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>>;
|
||||||
<span class="item-spacer" /> fn <a href="#tymethod.poll_flush" class="fn">poll_flush</a>(self, cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>>;
|
<span class="item-spacer" /> fn <a href="#tymethod.poll_flush" class="fn">poll_flush</a>(self, cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>>;
|
||||||
<span class="item-spacer" /> fn <a href="#tymethod.poll_close" class="fn">poll_close</a>(self, cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>>;
|
<span class="item-spacer" /> fn <a href="#tymethod.poll_close" class="fn">poll_close</a>(self, cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>>;
|
||||||
@ -12,6 +12,6 @@
|
|||||||
fn <a href="#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
|
fn <a href="#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
|
||||||
self,
|
self,
|
||||||
cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
cx: &mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>,
|
||||||
bufs: &[<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>]
|
bufs: &[<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>],
|
||||||
) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>> { ... }
|
) -> <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>>> { ... }
|
||||||
}</code>
|
}</code>
|
@ -11,7 +11,7 @@ pub use impl_trait_aux::func;
|
|||||||
// @has impl_trait/fn.func2.html
|
// @has impl_trait/fn.func2.html
|
||||||
// @has - '//pre[@class="rust item-decl"]' "func2<T>("
|
// @has - '//pre[@class="rust item-decl"]' "func2<T>("
|
||||||
// @has - '//pre[@class="rust item-decl"]' "_x: impl Deref<Target = Option<T>> + Iterator<Item = T>,"
|
// @has - '//pre[@class="rust item-decl"]' "_x: impl Deref<Target = Option<T>> + Iterator<Item = T>,"
|
||||||
// @has - '//pre[@class="rust item-decl"]' "_y: impl Iterator<Item = u8> )"
|
// @has - '//pre[@class="rust item-decl"]' "_y: impl Iterator<Item = u8>, )"
|
||||||
// @!has - '//pre[@class="rust item-decl"]' 'where'
|
// @!has - '//pre[@class="rust item-decl"]' 'where'
|
||||||
pub use impl_trait_aux::func2;
|
pub use impl_trait_aux::func2;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ use std::ops::Add;
|
|||||||
// @matches foo/fn.function_with_a_really_long_name.html '//*[@class="rust item-decl"]//code' "\
|
// @matches foo/fn.function_with_a_really_long_name.html '//*[@class="rust item-decl"]//code' "\
|
||||||
// function_with_a_really_long_name\(\n\
|
// function_with_a_really_long_name\(\n\
|
||||||
// \ parameter_one: i32,\n\
|
// \ parameter_one: i32,\n\
|
||||||
// \ parameter_two: i32\n\
|
// \ parameter_two: i32,\n\
|
||||||
// \) -> Option<i32>$"
|
// \) -> Option<i32>$"
|
||||||
pub fn function_with_a_really_long_name(parameter_one: i32, parameter_two: i32) -> Option<i32> {
|
pub fn function_with_a_really_long_name(parameter_one: i32, parameter_two: i32) -> Option<i32> {
|
||||||
Some(parameter_one + parameter_two)
|
Some(parameter_one + parameter_two)
|
||||||
|
Loading…
Reference in New Issue
Block a user