Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
21d67c45
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,发现更多精彩内容 >>
提交
21d67c45
编写于
10月 21, 2018
作者:
V
Vadim Petrochenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a few tests with target-specific output
Enable one fully ignored test
上级
7977250f
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
51 addition
and
31 deletion
+51
-31
src/libsyntax/parse/mod.rs
src/libsyntax/parse/mod.rs
+1
-1
src/test/ui/parser/issue-5806.rs
src/test/ui/parser/issue-5806.rs
+4
-8
src/test/ui/parser/issue-5806.stderr
src/test/ui/parser/issue-5806.stderr
+8
-0
src/test/ui/parser/mod_file_not_exist.rs
src/test/ui/parser/mod_file_not_exist.rs
+0
-1
src/test/ui/parser/mod_file_not_exist.stderr
src/test/ui/parser/mod_file_not_exist.stderr
+11
-0
src/test/ui/parser/mod_file_not_exist_windows.rs
src/test/ui/parser/mod_file_not_exist_windows.rs
+1
-15
src/test/ui/parser/mod_file_not_exist_windows.stderr
src/test/ui/parser/mod_file_not_exist_windows.stderr
+11
-0
src/test/ui/parser/mod_file_with_path_attr.rs
src/test/ui/parser/mod_file_with_path_attr.rs
+1
-0
src/test/ui/parser/mod_file_with_path_attr.stderr
src/test/ui/parser/mod_file_with_path_attr.stderr
+2
-2
src/test/ui/parser/regions-out-of-scope-slice.rs
src/test/ui/parser/regions-out-of-scope-slice.rs
+4
-4
src/test/ui/parser/regions-out-of-scope-slice.stderr
src/test/ui/parser/regions-out-of-scope-slice.stderr
+8
-0
未找到文件。
src/libsyntax/parse/mod.rs
浏览文件 @
21d67c45
...
...
@@ -230,7 +230,7 @@ fn file_to_source_file(sess: &ParseSess, path: &Path, spanopt: Option<Span>)
match
sess
.source_map
()
.load_file
(
path
)
{
Ok
(
source_file
)
=>
source_file
,
Err
(
e
)
=>
{
let
msg
=
format!
(
"couldn't read {
:?
}: {}"
,
path
.display
(),
e
);
let
msg
=
format!
(
"couldn't read {}: {}"
,
path
.display
(),
e
);
match
spanopt
{
Some
(
sp
)
=>
sess
.span_diagnostic
.span_fatal
(
sp
,
&
msg
)
.raise
(),
None
=>
sess
.span_diagnostic
.fatal
(
&
msg
)
.raise
()
...
...
src/test/ui/parser/issue-5806.rs
浏览文件 @
21d67c45
...
...
@@ -8,15 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-windows
// ignore-freebsd
// ignore-openbsd
// ignore-netbsd
// ignore-bitrig
// compile-flags: -Z parse-only
// normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG ("
// normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE"
#[path
=
"../
compile-fail
"
]
mod
foo
;
//~ ERROR
: a directory
#[path
=
"../
parser
"
]
mod
foo
;
//~ ERROR
couldn't read
fn
main
()
{}
src/test/ui/parser/issue-5806.stderr
0 → 100644
浏览文件 @
21d67c45
error: couldn't read $DIR/../parser: $ACCESS_DENIED_MSG (os error $ACCESS_DENIED_CODE)
--> $DIR/issue-5806.rs:16:5
|
LL | mod foo; //~ ERROR couldn't read
| ^^^
error: aborting due to previous error
src/test/ui/parser/mod_file_not_exist.rs
浏览文件 @
21d67c45
...
...
@@ -9,7 +9,6 @@
// except according to those terms.
// ignore-windows
// compile-flags: -Z parse-only
mod
not_a_real_file
;
//~ ERROR file not found for module `not_a_real_file`
...
...
src/test/ui/parser/mod_file_not_exist.stderr
0 → 100644
浏览文件 @
21d67c45
error[E0583]: file not found for module `not_a_real_file`
--> $DIR/mod_file_not_exist.rs:14:5
|
LL | mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file`
| ^^^^^^^^^^^^^^^
|
= help: name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory "$DIR"
error: aborting due to previous error
For more information about this error, try `rustc --explain E0583`.
src/test/ui/parser/mod_file_not_exist_windows.rs
浏览文件 @
21d67c45
...
...
@@ -8,21 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-android
// ignore-bitrig
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-gnu
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// only-windows
// compile-flags: -Z parse-only
mod
not_a_real_file
;
//~ ERROR file not found for module `not_a_real_file`
...
...
src/test/ui/parser/mod_file_not_exist_windows.stderr
0 → 100644
浏览文件 @
21d67c45
error[E0583]: file not found for module `not_a_real_file`
--> $DIR/mod_file_not_exist_windows.rs:14:5
|
LL | mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file`
| ^^^^^^^^^^^^^^^
|
= help: name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory "$DIR"
error: aborting due to previous error
For more information about this error, try `rustc --explain E0583`.
src/test/ui/parser/mod_file_with_path_attr.rs
浏览文件 @
21d67c45
...
...
@@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z parse-only
// normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG ("
#[path
=
"not_a_real_file.rs"
]
mod
m
;
//~ ERROR not_a_real_file.rs
...
...
src/test/ui/parser/mod_file_with_path_attr.stderr
浏览文件 @
21d67c45
error: couldn't read
"C:/msys64/home/we/rust/src/test/ui/parser/not_a_real_file.rs": The system cannot find the file specified.
(os error 2)
--> $DIR/mod_file_with_path_attr.rs:1
4
:5
error: couldn't read
$DIR/not_a_real_file.rs: $FILE_NOT_FOUND_MSG
(os error 2)
--> $DIR/mod_file_with_path_attr.rs:1
5
:5
|
LL | mod m; //~ ERROR not_a_real_file.rs
| ^
...
...
src/test/ui/parser/regions-out-of-scope-slice.rs
浏览文件 @
21d67c45
...
...
@@ -8,17 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//
compile-flags: -Z parse-only
//
blk region isn't supported in the front-end
//
ignore-test blk region isn't supported in the front-end
//
compile-flags: -Z parse-only
fn
foo
(
cond
:
bool
)
{
// Here we will infer a type that uses the
// region of the if stmt then block, but in the scope:
let
mut
x
;
//~ ERROR foo
let
mut
x
;
if
cond
{
x
=
&
'blk
[
1
,
2
,
3
];
x
=
&
'blk
[
1
,
2
,
3
];
//~ ERROR expected `:`, found `[`
}
}
...
...
src/test/ui/parser/regions-out-of-scope-slice.stderr
0 → 100644
浏览文件 @
21d67c45
error: expected `:`, found `[`
--> $DIR/regions-out-of-scope-slice.rs:21:19
|
LL | x = &'blk [1,2,3]; //~ ERROR expected `:`, found `[`
| ^ expected `:`
error: aborting due to previous error
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录