Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c8a5b671
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c8a5b671
编写于
6月 19, 2022
作者:
G
Guillaume Gomez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add test for invalid whitespace display after where clause
上级
c748551f
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
111 addition
and
0 deletion
+111
-0
src/test/rustdoc/whitespace-after-where-clause.enum.html
src/test/rustdoc/whitespace-after-where-clause.enum.html
+4
-0
src/test/rustdoc/whitespace-after-where-clause.enum2.html
src/test/rustdoc/whitespace-after-where-clause.enum2.html
+4
-0
src/test/rustdoc/whitespace-after-where-clause.rs
src/test/rustdoc/whitespace-after-where-clause.rs
+77
-0
src/test/rustdoc/whitespace-after-where-clause.struct.html
src/test/rustdoc/whitespace-after-where-clause.struct.html
+4
-0
src/test/rustdoc/whitespace-after-where-clause.struct2.html
src/test/rustdoc/whitespace-after-where-clause.struct2.html
+4
-0
src/test/rustdoc/whitespace-after-where-clause.trait.html
src/test/rustdoc/whitespace-after-where-clause.trait.html
+6
-0
src/test/rustdoc/whitespace-after-where-clause.trait2.html
src/test/rustdoc/whitespace-after-where-clause.trait2.html
+6
-0
src/test/rustdoc/whitespace-after-where-clause.union.html
src/test/rustdoc/whitespace-after-where-clause.union.html
+3
-0
src/test/rustdoc/whitespace-after-where-clause.union2.html
src/test/rustdoc/whitespace-after-where-clause.union2.html
+3
-0
未找到文件。
src/test/rustdoc/whitespace-after-where-clause.enum.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust enum"
><code>
pub enum Cow
<
'a, B:
 
?
<a
class=
"trait"
href=
"{{channel}}/core/marker/trait.Sized.html"
title=
"trait core::marker::Sized"
>
Sized
</a>
+ 'a
>
<span
class=
"where fmt-newline"
>
where
<br
/>
    
B:
<a
class=
"trait"
href=
"trait.ToOwned.html"
title=
"trait foo::ToOwned"
>
ToOwned
</a>
<
dyn
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
,
 
</span>
{
Borrowed(
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.reference.html"
>
&
'a
</a>
B),
Whatever(
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.u32.html"
>
u32
</a>
),
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.enum2.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust enum"
><code>
pub enum Cow2
<
'a, B:
 
?
<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>
<
dyn
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
+ 'a
>
{
Borrowed(
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.reference.html"
>
&
'a
</a>
B),
Whatever(
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.u32.html"
>
u32
</a>
),
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.rs
0 → 100644
浏览文件 @
c8a5b671
// This test ensures there is no whitespace before the first brace of
// trait, enum, struct and union items when they have a where clause.
#![crate_name
=
"foo"
]
// @has 'foo/trait.ToOwned.html'
// @snapshot trait - '//*[@class="docblock item-decl"]'
pub
trait
ToOwned
<
T
>
where
T
:
Clone
{
type
Owned
;
fn
to_owned
(
&
self
)
->
Self
::
Owned
;
fn
whatever
(
&
self
)
->
T
;
}
// @has 'foo/trait.ToOwned2.html'
// @snapshot trait2 - '//*[@class="docblock item-decl"]'
// There should be a whitespace before `{` in this case!
pub
trait
ToOwned2
<
T
:
Clone
>
{
type
Owned
;
fn
to_owned
(
&
self
)
->
Self
::
Owned
;
fn
whatever
(
&
self
)
->
T
;
}
// @has 'foo/enum.Cow.html'
// @snapshot enum - '//*[@class="docblock item-decl"]'
pub
enum
Cow
<
'a
,
B
:
?
Sized
+
'a
>
where
B
:
ToOwned
<
Clone
>
,
{
Borrowed
(
&
'a
B
),
Whatever
(
u32
),
}
// @has 'foo/enum.Cow2.html'
// @snapshot enum2 - '//*[@class="docblock item-decl"]'
// There should be a whitespace before `{` in this case!
pub
enum
Cow2
<
'a
,
B
:
?
Sized
+
ToOwned
<
Clone
>
+
'a
>
{
Borrowed
(
&
'a
B
),
Whatever
(
u32
),
}
// @has 'foo/struct.Struct.html'
// @snapshot struct - '//*[@class="docblock item-decl"]'
pub
struct
Struct
<
'a
,
B
:
?
Sized
+
'a
>
where
B
:
ToOwned
<
Clone
>
,
{
pub
a
:
&
'a
B
,
pub
b
:
u32
,
}
// @has 'foo/struct.Struct2.html'
// @snapshot struct2 - '//*[@class="docblock item-decl"]'
// There should be a whitespace before `{` in this case!
pub
struct
Struct2
<
'a
,
B
:
?
Sized
+
ToOwned
<
Clone
>
+
'a
>
{
pub
a
:
&
'a
B
,
pub
b
:
u32
,
}
// @has 'foo/union.Union.html'
// @snapshot union - '//*[@class="docblock item-decl"]'
pub
union
Union
<
'a
,
B
:
?
Sized
+
'a
>
where
B
:
ToOwned
<
Clone
>
,
{
a
:
&
'a
B
,
b
:
u32
,
}
// @has 'foo/union.Union2.html'
// @snapshot union2 - '//*[@class="docblock item-decl"]'
// There should be a whitespace before `{` in this case!
pub
union
Union2
<
'a
,
B
:
?
Sized
+
ToOwned
<
Clone
>
+
'a
>
{
a
:
&
'a
B
,
b
:
u32
,
}
src/test/rustdoc/whitespace-after-where-clause.struct.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust struct"
><code>
pub struct Struct
<
'a, B:
 
?
<a
class=
"trait"
href=
"{{channel}}/core/marker/trait.Sized.html"
title=
"trait core::marker::Sized"
>
Sized
</a>
+ 'a
>
<span
class=
"where fmt-newline"
>
where
<br
/>
    
B:
<a
class=
"trait"
href=
"trait.ToOwned.html"
title=
"trait foo::ToOwned"
>
ToOwned
</a>
<
dyn
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
,
 
</span>
{
pub a:
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.reference.html"
>
&
'a
</a>
B,
pub b:
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.u32.html"
>
u32
</a>
,
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.struct2.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust struct"
><code>
pub struct Struct2
<
'a, B:
 
?
<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>
<
dyn
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
+ 'a
>
{
pub a:
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.reference.html"
>
&
'a
</a>
B,
pub b:
<a
class=
"primitive"
href=
"{{channel}}/std/primitive.u32.html"
>
u32
</a>
,
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.trait.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust trait"
><code>
pub trait ToOwned
<
T
>
<span
class=
"where fmt-newline"
>
where
<br
/>
    
T:
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
,
 
</span>
{
type
<a
href=
"#associatedtype.Owned"
class=
"associatedtype"
>
Owned
</a>
;
fn
<a
href=
"#tymethod.to_owned"
class=
"fnname"
>
to_owned
</a>
(
&
self) -
>
Self::
<a
class=
"associatedtype"
href=
"trait.ToOwned.html#associatedtype.Owned"
title=
"type foo::ToOwned::Owned"
>
Owned
</a>
;
<span
class=
"item-spacer"
/>
fn
<a
href=
"#tymethod.whatever"
class=
"fnname"
>
whatever
</a>
(
&
self) -
>
T;
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.trait2.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust trait"
><code>
pub trait ToOwned2
<
T:
 
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
{
type
<a
href=
"#associatedtype.Owned"
class=
"associatedtype"
>
Owned
</a>
;
fn
<a
href=
"#tymethod.to_owned"
class=
"fnname"
>
to_owned
</a>
(
&
self) -
>
Self::
<a
class=
"associatedtype"
href=
"trait.ToOwned2.html#associatedtype.Owned"
title=
"type foo::ToOwned2::Owned"
>
Owned
</a>
;
<span
class=
"item-spacer"
/>
fn
<a
href=
"#tymethod.whatever"
class=
"fnname"
>
whatever
</a>
(
&
self) -
>
T;
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.union.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust union"
><code>
pub union Union
<
'a, B:
 
?
<a
class=
"trait"
href=
"{{channel}}/core/marker/trait.Sized.html"
title=
"trait core::marker::Sized"
>
Sized
</a>
+ 'a
>
<span
class=
"where fmt-newline"
>
where
<br
/>
    
B:
<a
class=
"trait"
href=
"trait.ToOwned.html"
title=
"trait foo::ToOwned"
>
ToOwned
</a>
<
dyn
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
,
 
</span>
{
/* private fields */
}
</code></pre></div>
src/test/rustdoc/whitespace-after-where-clause.union2.html
0 → 100644
浏览文件 @
c8a5b671
<div
class=
"docblock item-decl"
><pre
class=
"rust union"
><code>
pub union Union2
<
'a, B:
 
?
<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>
<
dyn
<a
class=
"trait"
href=
"{{channel}}/core/clone/trait.Clone.html"
title=
"trait core::clone::Clone"
>
Clone
</a>
>
+ 'a
>
{
/* private fields */
}
</code></pre></div>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录