Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
2df8799f
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,发现更多精彩内容 >>
提交
2df8799f
编写于
5月 03, 2013
作者:
T
Tim Chevalier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rustc: Warning police
上级
1a5f11a1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
11 deletion
+8
-11
src/librustc/metadata/loader.rs
src/librustc/metadata/loader.rs
+1
-1
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/base.rs
+6
-8
src/librustc/middle/ty.rs
src/librustc/middle/ty.rs
+1
-1
src/librustc/rustc.rc
src/librustc/rustc.rc
+0
-1
未找到文件。
src/librustc/metadata/loader.rs
浏览文件 @
2df8799f
...
...
@@ -196,7 +196,7 @@ fn get_metadata_section(os: os,
while
llvm
::
LLVMIsSectionIteratorAtEnd
(
of
.llof
,
si
.llsi
)
==
False
{
let
name_buf
=
llvm
::
LLVMGetSectionName
(
si
.llsi
);
let
name
=
unsafe
{
str
::
raw
::
from_c_str
(
name_buf
)
};
debug!
(
"get_m
a
tadata_section: name %s"
,
name
);
debug!
(
"get_m
e
tadata_section: name %s"
,
name
);
if
name
==
read_meta_section_name
(
os
)
{
let
cbuf
=
llvm
::
LLVMGetSectionContents
(
si
.llsi
);
let
csz
=
llvm
::
LLVMGetSectionSize
(
si
.llsi
)
as
uint
;
...
...
src/librustc/middle/trans/base.rs
浏览文件 @
2df8799f
...
...
@@ -2096,8 +2096,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
}
pub
fn
trans_enum_def
(
ccx
:
@
CrateContext
,
enum_definition
:
&
ast
::
enum_def
,
id
:
ast
::
node_id
,
path
:
@
ast_map
::
path
,
vi
:
@~
[
ty
::
VariantInfo
],
id
:
ast
::
node_id
,
vi
:
@~
[
ty
::
VariantInfo
],
i
:
&
mut
uint
)
{
for
vec
::
each
(
enum_definition
.variants
)
|
variant
|
{
let
disr_val
=
vi
[
*
i
]
.disr_val
;
...
...
@@ -2172,8 +2171,7 @@ pub fn trans_item(ccx: @CrateContext, item: &ast::item) {
if
!
generics
.is_type_parameterized
()
{
let
vi
=
ty
::
enum_variants
(
ccx
.tcx
,
local_def
(
item
.id
));
let
mut
i
=
0
;
trans_enum_def
(
ccx
,
enum_definition
,
item
.id
,
path
,
vi
,
&
mut
i
);
trans_enum_def
(
ccx
,
enum_definition
,
item
.id
,
vi
,
&
mut
i
);
}
}
ast
::
item_const
(
_
,
expr
)
=>
consts
::
trans_const
(
ccx
,
expr
,
item
.id
),
...
...
@@ -2430,13 +2428,13 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
Some
(
&
v
)
=>
v
,
None
=>
{
let
mut
exprt
=
false
;
let
val
=
match
*
ccx
.
tcx.items
.get
(
&
id
)
{
let
val
=
match
*
tcx
.items
.get
(
&
id
)
{
ast_map
::
node_item
(
i
,
pth
)
=>
{
let
my_path
=
vec
::
append
(
/*bad*/
copy
*
pth
,
~
[
path_name
(
i
.ident
)]);
match
i
.node
{
ast
::
item_const
(
_
,
expr
)
=>
{
let
typ
=
ty
::
node_id_to_type
(
ccx
.
tcx
,
i
.id
);
let
typ
=
ty
::
node_id_to_type
(
tcx
,
i
.id
);
let
s
=
mangle_exported_name
(
ccx
,
my_path
,
typ
);
// We need the translated value here, because for enums the
// LLVM type is not fully determined by the Rust type.
...
...
@@ -2495,7 +2493,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
ni
.attrs
)
}
ast
::
foreign_item_const
(
*
)
=>
{
let
typ
=
ty
::
node_id_to_type
(
ccx
.
tcx
,
ni
.id
);
let
typ
=
ty
::
node_id_to_type
(
tcx
,
ni
.id
);
let
ident
=
ccx
.sess.parse_sess.interner
.get
(
ni
.ident
);
let
g
=
do
str
::
as_c_str
(
*
ident
)
|
buf
|
{
unsafe
{
...
...
@@ -2536,7 +2534,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
// Only register the constructor if this is a tuple-like struct.
match
struct_def
.ctor_id
{
None
=>
{
ccx
.
tcx.sess
.bug
(
~
"attempt to register a constructor of
\
tcx
.sess
.bug
(
~
"attempt to register a constructor of
\
a non-tuple-like struct"
)
}
Some
(
ctor_id
)
=>
{
...
...
src/librustc/middle/ty.rs
浏览文件 @
2df8799f
...
...
@@ -33,7 +33,7 @@
use
core
::
hashmap
::{
HashMap
,
HashSet
};
use
std
::
smallintmap
::
SmallIntMap
;
use
syntax
::
ast
::
*
;
use
syntax
::
ast_util
::
{
is_local
,
local_def
}
;
use
syntax
::
ast_util
::
is_local
;
use
syntax
::
ast_util
;
use
syntax
::
attr
;
use
syntax
::
codemap
::
span
;
...
...
src/librustc/rustc.rc
浏览文件 @
2df8799f
...
...
@@ -20,7 +20,6 @@
#[allow(non_implicitly_copyable_typarams)];
#[allow(non_camel_case_types)];
#[deny(deprecated_pattern)];
#[deny(deprecated_mode)];
extern mod std(vers = "0.7-pre");
extern mod syntax(vers = "0.7-pre");
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录