Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
ddfaf10f
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
ddfaf10f
编写于
6月 10, 2016
作者:
G
Guillaume Gomez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add error code flag
上级
7746d7c5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
18 deletion
+21
-18
src/librustc_privacy/diagnostics.rs
src/librustc_privacy/diagnostics.rs
+5
-5
src/librustdoc/html/markdown.rs
src/librustdoc/html/markdown.rs
+15
-12
src/librustdoc/test.rs
src/librustdoc/test.rs
+1
-1
未找到文件。
src/librustc_privacy/diagnostics.rs
浏览文件 @
ddfaf10f
...
...
@@ -16,7 +16,7 @@
A private trait was used on a public type parameter bound. Erroneous code
examples:
```compile_fail
```compile_fail
,E0445
#![deny(private_in_public)]
trait Foo {
...
...
@@ -46,7 +46,7 @@ pub fn foo<T: Foo> (t: T) {} // ok!
E0446
:
r##"
A private type was used in a public type signature. Erroneous code example:
```compile_fail
```compile_fail
,E0446
#![deny(private_in_public)]
mod Foo {
...
...
@@ -100,7 +100,7 @@ pub enum Foo {
Since the enum is already public, adding `pub` on one its elements is
unnecessary. Example:
```compile_fail
```compile_fail
,
enum Foo {
pub Bar, // not ok!
}
...
...
@@ -119,7 +119,7 @@ pub enum Foo {
A tuple constructor was invoked while some of its fields are private. Erroneous
code example:
```compile_fail
```compile_fail
,E0450
mod Bar {
pub struct Foo(isize);
}
...
...
@@ -157,7 +157,7 @@ pub fn new(x: isize) -> Foo {
E0451
:
r##"
A struct constructor with private fields was invoked. Erroneous code example:
```compile_fail
```compile_fail
,E0451
mod Bar {
pub struct Foo {
pub a: isize,
...
...
src/librustdoc/html/markdown.rs
浏览文件 @
ddfaf10f
...
...
@@ -605,18 +605,21 @@ fn t(s: &str,
}
// marker | should_panic| no_run| ignore| rust | test_harness| compile_fail
t
(
""
,
false
,
false
,
false
,
true
,
false
,
false
);
t
(
"rust"
,
false
,
false
,
false
,
true
,
false
,
false
);
t
(
"sh"
,
false
,
false
,
false
,
false
,
false
,
false
);
t
(
"ignore"
,
false
,
false
,
true
,
true
,
false
,
false
);
t
(
"should_panic"
,
true
,
false
,
false
,
true
,
false
,
false
);
t
(
"no_run"
,
false
,
true
,
false
,
true
,
false
,
false
);
t
(
"test_harness"
,
false
,
false
,
false
,
true
,
true
,
false
);
t
(
"compile_fail"
,
false
,
true
,
false
,
true
,
false
,
true
);
t
(
"{.no_run .example}"
,
false
,
true
,
false
,
true
,
false
,
false
);
t
(
"{.sh .should_panic}"
,
true
,
false
,
false
,
true
,
false
,
false
);
t
(
"{.example .rust}"
,
false
,
false
,
false
,
true
,
false
,
false
);
t
(
"{.test_harness .rust}"
,
false
,
false
,
false
,
true
,
true
,
false
);
// | error_codes
t
(
""
,
false
,
false
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"rust"
,
false
,
false
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"sh"
,
false
,
false
,
false
,
false
,
false
,
false
,
Vec
::
new
());
t
(
"ignore"
,
false
,
false
,
true
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"should_panic"
,
true
,
false
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"no_run"
,
false
,
true
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"test_harness"
,
false
,
false
,
false
,
true
,
true
,
false
,
Vec
::
new
());
t
(
"compile_fail"
,
false
,
true
,
false
,
true
,
false
,
true
,
Vec
::
new
());
t
(
"E0450"
,
false
,
false
,
false
,
true
,
false
,
false
,
vec!
(
"E0450"
.to_owned
()));
t
(
"{.no_run .example}"
,
false
,
true
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"{.sh .should_panic}"
,
true
,
false
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"{.example .rust}"
,
false
,
false
,
false
,
true
,
false
,
false
,
Vec
::
new
());
t
(
"{.test_harness .rust}"
,
false
,
false
,
false
,
true
,
true
,
false
,
Vec
::
new
());
}
#[test]
...
...
src/librustdoc/test.rs
浏览文件 @
ddfaf10f
...
...
@@ -275,7 +275,7 @@ fn drop(&mut self) {
}
if
count
>
0
&&
error_codes
.len
()
>
0
{
let
out
=
String
::
from_utf8
(
data
.lock
()
.unwrap
()
.to_vec
())
.unwrap
();
error_codes
=
error_codes
.into_iter
()
.filter
(|
err
|
!
out
.contains
(
err
))
.collect
(
);
error_codes
.retain
(|
err
|
!
out
.contains
(
err
)
);
}
}
Ok
(())
if
compile_fail
=>
panic!
(
"test compiled while it wasn't supposed to"
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录