Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c1a73d2f
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,发现更多精彩内容 >>
提交
c1a73d2f
编写于
3月 09, 2018
作者:
V
Vadim Petrochenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tidy: Add a check for stray `.stderr` and `.stdout` files in UI test directories
上级
fedce67c
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
28 addition
and
140 deletion
+28
-140
src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr
src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr
+0
-19
src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr
...osure-requirements/propagate-approximated-to-empty.stderr
+0
-45
src/test/ui/resolve-error.stderr
src/test/ui/resolve-error.stderr
+0
-62
src/test/ui/span/loan-extend.stderr
src/test/ui/span/loan-extend.stderr
+0
-14
src/tools/tidy/src/lib.rs
src/tools/tidy/src/lib.rs
+1
-0
src/tools/tidy/src/main.rs
src/tools/tidy/src/main.rs
+1
-0
src/tools/tidy/src/ui_tests.rs
src/tools/tidy/src/ui_tests.rs
+26
-0
未找到文件。
src/test/ui/lifetime-errors/ex3-both-anon-regions-4.stderr
已删除
100644 → 0
浏览文件 @
fedce67c
error[E0623]: lifetime mismatch
--> $DIR/ex3-both-anon-regions-4.rs:12:13
|
11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
| --- --- these references are declared with different lifetimes...
12 | z.push((x,y));
| ^ ...but data flows into `z` here
error[E0623]: lifetime mismatch
--> $DIR/ex3-both-anon-regions-4.rs:12:15
|
11 | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
| --- --- these references are declared with different lifetimes...
12 | z.push((x,y));
| ^ ...but data flows into `z` here
error: aborting due to 2 previous errors
If you want more information on this error, try using "rustc --explain E0623"
src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr
已删除
100644 → 0
浏览文件 @
fedce67c
warning: not reporting region error due to -Znll
--> $DIR/propagate-approximated-to-empty.rs:41:9
|
41 | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^
error: free region `'_#6r` does not outlive free region `'_#4r`
--> $DIR/propagate-approximated-to-empty.rs:41:18
|
41 | demand_y(x, y, x.get())
| ^
note: No external requirements
--> $DIR/propagate-approximated-to-empty.rs:39:47
|
39 | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
| _______________________________________________^
40 | | // Only works if 'x: 'y:
41 | | demand_y(x, y, x.get())
42 | | //~^ WARN not reporting region error due to -Znll
43 | | //~| ERROR free region `'_#6r` does not outlive free region `'_#4r`
44 | | });
| |_____^
|
= note: defining type: DefId(0/1:18 ~ propagate_approximated_to_empty[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { depth: 1 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>))
]
note: No external requirements
--> $DIR/propagate-approximated-to-empty.rs:38:1
|
38 | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
39 | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
40 | | // Only works if 'x: 'y:
41 | | demand_y(x, y, x.get())
... |
44 | | });
45 | | }
| |_^
|
= note: defining type: DefId(0/0:6 ~ propagate_approximated_to_empty[317d]::supply[0]) with substs []
error: aborting due to previous error
src/test/ui/resolve-error.stderr
已删除
100644 → 0
浏览文件 @
fedce67c
error: cannot find derive macro `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:37:10
|
37 | #[derive(FooWithLongNan)]
| ^^^^^^^^^^^^^^ help: try: `FooWithLongName`
error: cannot find attribute macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:40:3
|
40 | #[attr_proc_macra]
| ^^^^^^^^^^^^^^^ help: try: `attr_proc_macro`
error: cannot find attribute macro `FooWithLongNan` in this scope
--> $DIR/resolve-error.rs:43:3
|
43 | #[FooWithLongNan]
| ^^^^^^^^^^^^^^
error: cannot find derive macro `Dlone` in this scope
--> $DIR/resolve-error.rs:46:10
|
46 | #[derive(Dlone)]
| ^^^^^ help: try: `Clone`
error: cannot find derive macro `Dlona` in this scope
--> $DIR/resolve-error.rs:49:10
|
49 | #[derive(Dlona)]
| ^^^^^ help: try: `Clona`
error: cannot find derive macro `attr_proc_macra` in this scope
--> $DIR/resolve-error.rs:52:10
|
52 | #[derive(attr_proc_macra)]
| ^^^^^^^^^^^^^^^
error: cannot find macro `FooWithLongNama!` in this scope
--> $DIR/resolve-error.rs:56:5
|
56 | FooWithLongNama!();
| ^^^^^^^^^^^^^^^ help: you could try the macro: `FooWithLongNam!`
error: cannot find macro `attr_proc_macra!` in this scope
--> $DIR/resolve-error.rs:58:5
|
58 | attr_proc_macra!();
| ^^^^^^^^^^^^^^^ help: you could try the macro: `attr_proc_mac!`
error: cannot find macro `Dlona!` in this scope
--> $DIR/resolve-error.rs:60:5
|
60 | Dlona!();
| ^^^^^
error: cannot find macro `bang_proc_macrp!` in this scope
--> $DIR/resolve-error.rs:62:5
|
62 | bang_proc_macrp!();
| ^^^^^^^^^^^^^^^ help: you could try the macro: `bang_proc_macro!`
error: aborting due to previous error(s)
src/test/ui/span/loan-extend.stderr
已删除
100644 → 0
浏览文件 @
fedce67c
error[E0597]: `short` does not live long enough
--> $DIR/loan-extend.rs:21:1
|
19 | long = borrow(&mut short);
| ----- borrow occurs here
20 |
21 | }
| ^ `short` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error: aborting due to previous error
If you want more information on this error, try using "rustc --explain E0597"
src/tools/tidy/src/lib.rs
浏览文件 @
c1a73d2f
...
...
@@ -51,6 +51,7 @@
pub
mod
cargo
;
pub
mod
pal
;
pub
mod
deps
;
pub
mod
ui_tests
;
pub
mod
unstable_book
;
fn
filter_dirs
(
path
:
&
Path
)
->
bool
{
...
...
src/tools/tidy/src/main.rs
浏览文件 @
c1a73d2f
...
...
@@ -45,6 +45,7 @@ fn main() {
deps
::
check
(
&
path
,
&
mut
bad
);
}
deps
::
check_whitelist
(
&
path
,
&
cargo
,
&
mut
bad
);
ui_tests
::
check
(
&
path
,
&
mut
bad
);
if
bad
{
eprintln!
(
"some tidy checks failed"
);
...
...
src/tools/tidy/src/ui_tests.rs
0 → 100644
浏览文件 @
c1a73d2f
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Tidy check to ensure that there are no stray `.stderr` files in UI test directories.
use
std
::
path
::
Path
;
pub
fn
check
(
path
:
&
Path
,
bad
:
&
mut
bool
)
{
super
::
walk_many
(
&
[
&
path
.join
(
"test/ui"
),
&
path
.join
(
"test/ui-fulldeps"
)],
&
mut
|
_
|
false
,
&
mut
|
file_path
|
{
if
let
Some
(
ext
)
=
file_path
.extension
()
{
if
(
ext
==
"stderr"
||
ext
==
"stdout"
)
&&
!
file_path
.with_extension
(
"rs"
)
.exists
()
{
println!
(
"Stray file with UI testing output: {:?}"
,
file_path
);
*
bad
=
true
;
}
}
});
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录