Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
139346ad
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,发现更多精彩内容 >>
提交
139346ad
编写于
12月 26, 2014
作者:
E
Eduard Burtescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tests: fix fallout of merging ast::ViewItem into ast::Item.
上级
838b2ea7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
14 addition
and
47 deletion
+14
-47
src/librustc_driver/test.rs
src/librustc_driver/test.rs
+1
-0
src/libsyntax/parse/mod.rs
src/libsyntax/parse/mod.rs
+8
-8
src/test/compile-fail-fulldeps/gated-plugin.rs
src/test/compile-fail-fulldeps/gated-plugin.rs
+1
-2
src/test/compile-fail/issue-9957.rs
src/test/compile-fail/issue-9957.rs
+0
-15
src/test/compile-fail/unnecessary-private.rs
src/test/compile-fail/unnecessary-private.rs
+2
-1
src/test/compile-fail/view-items-at-top.rs
src/test/compile-fail/view-items-at-top.rs
+0
-19
src/test/pretty/issue-4264.pp
src/test/pretty/issue-4264.pp
+2
-2
未找到文件。
src/librustc_driver/test.rs
浏览文件 @
139346ad
...
@@ -200,6 +200,7 @@ fn search(this: &Env,
...
@@ -200,6 +200,7 @@ fn search(this: &Env,
}
}
return
match
it
.node
{
return
match
it
.node
{
ast
::
ItemUse
(
..
)
|
ast
::
ItemExternCrate
(
..
)
|
ast
::
ItemConst
(
..
)
|
ast
::
ItemStatic
(
..
)
|
ast
::
ItemFn
(
..
)
|
ast
::
ItemConst
(
..
)
|
ast
::
ItemStatic
(
..
)
|
ast
::
ItemFn
(
..
)
|
ast
::
ItemForeignMod
(
..
)
|
ast
::
ItemTy
(
..
)
=>
{
ast
::
ItemForeignMod
(
..
)
|
ast
::
ItemTy
(
..
)
=>
{
None
None
...
...
src/libsyntax/parse/mod.rs
浏览文件 @
139346ad
...
@@ -1109,25 +1109,25 @@ fn parser_done(p: Parser){
...
@@ -1109,25 +1109,25 @@ fn parser_done(p: Parser){
#[test]
fn
parse_use
()
{
#[test]
fn
parse_use
()
{
let
use_s
=
"use foo::bar::baz;"
;
let
use_s
=
"use foo::bar::baz;"
;
let
vitem
=
string_to_item
(
use_s
.to_string
());
let
vitem
=
string_to_item
(
use_s
.to_string
())
.unwrap
()
;
let
vitem_s
=
item_to_string
(
&
vitem
);
let
vitem_s
=
item_to_string
(
&
*
vitem
);
assert_eq!
(
&
vitem_s
[],
use_s
);
assert_eq!
(
&
vitem_s
[],
use_s
);
let
use_s
=
"use foo::bar as baz;"
;
let
use_s
=
"use foo::bar as baz;"
;
let
vitem
=
string_to_item
(
use_s
.to_string
());
let
vitem
=
string_to_item
(
use_s
.to_string
())
.unwrap
()
;
let
vitem_s
=
item_to_string
(
&
vitem
);
let
vitem_s
=
item_to_string
(
&
*
vitem
);
assert_eq!
(
&
vitem_s
[],
use_s
);
assert_eq!
(
&
vitem_s
[],
use_s
);
}
}
#[test]
fn
parse_extern_crate
()
{
#[test]
fn
parse_extern_crate
()
{
let
ex_s
=
"extern crate foo;"
;
let
ex_s
=
"extern crate foo;"
;
let
vitem
=
string_to_item
(
ex_s
.to_string
());
let
vitem
=
string_to_item
(
ex_s
.to_string
())
.unwrap
()
;
let
vitem_s
=
item_to_string
(
&
vitem
);
let
vitem_s
=
item_to_string
(
&
*
vitem
);
assert_eq!
(
&
vitem_s
[],
ex_s
);
assert_eq!
(
&
vitem_s
[],
ex_s
);
let
ex_s
=
"extern crate
\"
foo
\"
as bar;"
;
let
ex_s
=
"extern crate
\"
foo
\"
as bar;"
;
let
vitem
=
string_to_item
(
ex_s
.to_string
());
let
vitem
=
string_to_item
(
ex_s
.to_string
())
.unwrap
()
;
let
vitem_s
=
item_to_string
(
&
vitem
);
let
vitem_s
=
item_to_string
(
&
*
vitem
);
assert_eq!
(
&
vitem_s
[],
ex_s
);
assert_eq!
(
&
vitem_s
[],
ex_s
);
}
}
...
...
src/test/compile-fail-fulldeps/gated-plugin.rs
浏览文件 @
139346ad
...
@@ -11,8 +11,7 @@
...
@@ -11,8 +11,7 @@
// aux-build:macro_crate_test.rs
// aux-build:macro_crate_test.rs
// ignore-stage1
// ignore-stage1
#[plugin]
#[no_link]
#[plugin]
#[no_link]
extern
crate
macro_crate_test
;
//~^ ERROR compiler plugins are experimental and possibly buggy
//~^ ERROR compiler plugins are experimental and possibly buggy
extern
crate
macro_crate_test
;
fn
main
()
{}
fn
main
()
{}
src/test/compile-fail/issue-9957.rs
已删除
100644 → 0
浏览文件 @
838b2ea7
// Copyright 2014 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.
pub
extern
crate
core
;
//~ ERROR: `pub` visibility is not allowed
fn
main
()
{
pub
use
std
::
usize
;
//~ ERROR: imports in functions are never reachable
}
src/test/compile-fail/unnecessary-private.rs
浏览文件 @
139346ad
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013
-2014
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
// http://rust-lang.org/COPYRIGHT.
//
//
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
// except according to those terms.
// except according to those terms.
fn
main
()
{
fn
main
()
{
pub
use
std
::
uint
;
//~ ERROR: visibility has no effect
pub
struct
A
;
//~ ERROR: visibility has no effect
pub
struct
A
;
//~ ERROR: visibility has no effect
pub
enum
B
{}
//~ ERROR: visibility has no effect
pub
enum
B
{}
//~ ERROR: visibility has no effect
pub
trait
C
{
//~ ERROR: visibility has no effect
pub
trait
C
{
//~ ERROR: visibility has no effect
...
...
src/test/compile-fail/view-items-at-top.rs
已删除
100644 → 0
浏览文件 @
838b2ea7
// Copyright 2012-2014 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.
extern
crate
test
;
fn
f
()
{
}
use
test
::
net
;
//~ ERROR `use` and `extern crate` declarations must precede items
fn
main
()
{
}
src/test/pretty/issue-4264.pp
浏览文件 @
139346ad
#![no_std]
#![no_std]
#[macro_use]
extern
crate
"std"
as
std
;
#[prelude_import]
#[prelude_import]
use
std::prelude::v1
::
*
;
use
std::prelude::v1
::
*
;
#[macro_use]
extern
crate
"std"
as
std
;
//
Copyright
2014
The
Rust
Project
Developers
.
See
the
COPYRIGHT
//
Copyright
2014
The
Rust
Project
Developers
.
See
the
COPYRIGHT
//
file
at
the
top
-
level
directory
of
this
distribution
and
at
//
file
at
the
top
-
level
directory
of
this
distribution
and
at
//
http
:
//
rust
-
lang
.
org
/
COPYRIGHT
.
//
http
:
//
rust
-
lang
.
org
/
COPYRIGHT
.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录