Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
2cb210d2
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,发现更多精彩内容 >>
提交
2cb210d2
编写于
9月 01, 2014
作者:
W
wickerwaka
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated to new extern crate syntax.
Added warning for old deprecated syntax
上级
b42e079c
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
25 addition
and
20 deletion
+25
-20
src/driver/driver.rs
src/driver/driver.rs
+2
-2
src/libregex/lib.rs
src/libregex/lib.rs
+1
-1
src/librustc/front/std_inject.rs
src/librustc/front/std_inject.rs
+1
-1
src/librustc/lib.rs
src/librustc/lib.rs
+2
-2
src/librustdoc/lib.rs
src/librustdoc/lib.rs
+1
-1
src/librustrt/lib.rs
src/librustrt/lib.rs
+1
-1
src/librustuv/lib.rs
src/librustuv/lib.rs
+1
-1
src/libstd/lib.rs
src/libstd/lib.rs
+4
-4
src/libsyntax/parse/parser.rs
src/libsyntax/parse/parser.rs
+8
-3
src/test/compile-fail/issue-16725.rs
src/test/compile-fail/issue-16725.rs
+1
-1
src/test/compile-fail/regions-bounded-method-type-parameters-cross-crate.rs
...ail/regions-bounded-method-type-parameters-cross-crate.rs
+1
-1
src/test/run-pass/issue-15562.rs
src/test/run-pass/issue-15562.rs
+1
-1
src/test/run-pass/issue-16643.rs
src/test/run-pass/issue-16643.rs
+1
-1
未找到文件。
src/driver/driver.rs
浏览文件 @
2cb210d2
...
...
@@ -9,9 +9,9 @@
// except according to those terms.
#[cfg(rustdoc)]
extern
crate
this
=
"rustdoc"
;
extern
crate
"rustdoc"
as
this
;
#[cfg(rustc)]
extern
crate
this
=
"rustc"
;
extern
crate
"rustc"
as
this
;
fn
main
()
{
this
::
main
()
}
src/libregex/lib.rs
浏览文件 @
2cb210d2
...
...
@@ -372,7 +372,7 @@
#![deny(missing_doc)]
#[cfg(test)]
extern
crate
stdtest
=
"test"
;
extern
crate
"test"
as
stdtest
;
#[cfg(test)]
extern
crate
rand
;
...
...
src/librustc/front/std_inject.rs
浏览文件 @
2cb210d2
...
...
@@ -62,7 +62,7 @@ struct StandardLibraryInjector<'a> {
impl
<
'a
>
fold
::
Folder
for
StandardLibraryInjector
<
'a
>
{
fn
fold_crate
(
&
mut
self
,
mut
krate
:
ast
::
Crate
)
->
ast
::
Crate
{
// The name to use in `extern crate
std = "name"
;`
// The name to use in `extern crate
"name" as std
;`
let
actual_crate_name
=
match
self
.sess.opts.alt_std_name
{
Some
(
ref
s
)
=>
token
::
intern_and_get_ident
(
s
.as_slice
()),
None
=>
token
::
intern_and_get_ident
(
"std"
),
...
...
src/librustc/lib.rs
浏览文件 @
2cb210d2
...
...
@@ -42,8 +42,8 @@
extern
crate
getopts
;
extern
crate
graphviz
;
extern
crate
libc
;
extern
crate
llvm
=
"rustc_llvm"
;
extern
crate
rustc_back
=
"rustc_back"
;
extern
crate
"rustc_llvm"
as
llvm
;
extern
crate
"rustc_back"
as
rustc_back
;
extern
crate
serialize
;
extern
crate
rbml
;
extern
crate
time
;
...
...
src/librustdoc/lib.rs
浏览文件 @
2cb210d2
...
...
@@ -23,7 +23,7 @@
extern
crate
rustc
;
extern
crate
serialize
;
extern
crate
syntax
;
extern
crate
testing
=
"test"
;
extern
crate
"test"
as
testing
;
extern
crate
time
;
#[phase(plugin,
link)]
extern
crate
log
;
...
...
src/librustrt/lib.rs
浏览文件 @
2cb210d2
...
...
@@ -27,7 +27,7 @@
extern
crate
libc
;
extern
crate
collections
;
#[cfg(test)]
extern
crate
realrustrt
=
"rustrt"
;
#[cfg(test)]
extern
crate
"rustrt"
as
realrustrt
;
#[cfg(test)]
extern
crate
test
;
#[cfg(test)]
extern
crate
native
;
...
...
src/librustuv/lib.rs
浏览文件 @
2cb210d2
...
...
@@ -52,7 +52,7 @@
#[cfg(test)]
extern
crate
green
;
#[cfg(test)]
extern
crate
debug
;
#[cfg(test)]
extern
crate
realrustuv
=
"rustuv"
;
#[cfg(test)]
extern
crate
"rustuv"
as
realrustuv
;
extern
crate
libc
;
extern
crate
alloc
;
...
...
src/libstd/lib.rs
浏览文件 @
2cb210d2
...
...
@@ -129,14 +129,14 @@
extern
crate
alloc
;
extern
crate
unicode
;
extern
crate
core
;
extern
crate
core_collections
=
"collections"
;
extern
crate
core_rand
=
"rand"
;
extern
crate
core_sync
=
"sync"
;
extern
crate
"collections"
as
core_collections
;
extern
crate
"rand"
as
core_rand
;
extern
crate
"sync"
as
core_sync
;
extern
crate
libc
;
extern
crate
rustrt
;
// Make std testable by not duplicating lang items. See #2912
#[cfg(test)]
extern
crate
realstd
=
"std"
;
#[cfg(test)]
extern
crate
"std"
as
realstd
;
#[cfg(test)]
pub
use
realstd
::
kinds
;
#[cfg(test)]
pub
use
realstd
::
ops
;
#[cfg(test)]
pub
use
realstd
::
cmp
;
...
...
src/libsyntax/parse/parser.rs
浏览文件 @
2cb210d2
...
...
@@ -4773,11 +4773,16 @@ fn parse_item_extern_crate(&mut self,
token
::
IDENT
(
..
)
=>
{
let
the_ident
=
self
.parse_ident
();
self
.expect_one_of
(
&
[],
&
[
token
::
EQ
,
token
::
SEMI
]);
// NOTE - #16689 change this to a warning once
// the 'as' support is in stage0
let
path
=
if
self
.token
==
token
::
EQ
{
self
.bump
();
Some
(
self
.parse_str
())
let
path
=
self
.parse_str
();
let
span
=
self
.span
;
self
.span_warn
(
span
,
format!
(
"this extern crate syntax is deprecated.
\
Use: extern create
\"
{}
\"
as {};"
,
the_ident
.as_str
(),
path
.ref0
()
.get
()
)
.as_slice
()
);
Some
(
path
)
}
else
{
None
};
self
.expect
(
&
token
::
SEMI
);
...
...
src/test/compile-fail/issue-16725.rs
浏览文件 @
2cb210d2
...
...
@@ -10,7 +10,7 @@
// aux-build:issue-16725.rs
extern
crate
foo
=
"issue-16725"
;
extern
crate
"issue-16725"
as
foo
;
fn
main
()
{
unsafe
{
foo
::
bar
();
}
...
...
src/test/compile-fail/regions-bounded-method-type-parameters-cross-crate.rs
浏览文件 @
2cb210d2
...
...
@@ -12,7 +12,7 @@
// Check explicit region bounds on methods in the cross crate case.
extern
crate
lib
=
"regions-bounded-method-type-parameters-cross-crate-lib"
;
extern
crate
"regions-bounded-method-type-parameters-cross-crate-lib"
as
lib
;
use
lib
::
Inv
;
use
lib
::
MaybeOwned
;
...
...
src/test/run-pass/issue-15562.rs
浏览文件 @
2cb210d2
...
...
@@ -10,7 +10,7 @@
// aux-build:issue-15562.rs
extern
crate
i
=
"issue-15562"
;
extern
crate
"issue-15562"
as
i
;
pub
fn
main
()
{
extern
{
...
...
src/test/run-pass/issue-16643.rs
浏览文件 @
2cb210d2
...
...
@@ -10,7 +10,7 @@
// aux-build:issue-16643.rs
extern
crate
i
=
"issue-16643"
;
extern
crate
"issue-16643"
as
i
;
pub
fn
main
()
{
i
::
TreeBuilder
::
<
uint
>
.process_token
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录