Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
0c6d02f3
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,发现更多精彩内容 >>
提交
0c6d02f3
编写于
7月 08, 2013
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correct merge errors
上级
b5fc4ae9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
24 addition
and
20 deletion
+24
-20
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/_match.rs
+4
-4
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/base.rs
+10
-6
src/librustc/middle/typeck/coherence.rs
src/librustc/middle/typeck/coherence.rs
+2
-2
src/libstd/vec.rs
src/libstd/vec.rs
+1
-1
src/libsyntax/ext/deriving/generic.rs
src/libsyntax/ext/deriving/generic.rs
+4
-4
src/libsyntax/ext/pipes/pipec.rs
src/libsyntax/ext/pipes/pipec.rs
+1
-1
src/libsyntax/parse/parser.rs
src/libsyntax/parse/parser.rs
+1
-1
src/libsyntax/print/pprust.rs
src/libsyntax/print/pprust.rs
+1
-1
未找到文件。
src/librustc/middle/trans/_match.rs
浏览文件 @
0c6d02f3
...
...
@@ -1842,7 +1842,7 @@ pub fn store_arg(mut bcx: block,
fn
mk_binding_alloca
(
mut
bcx
:
block
,
p_id
:
ast
::
node_id
,
path
:
@
ast
::
Path
,
path
:
&
ast
::
Path
,
binding_mode
:
IrrefutablePatternBindingMode
,
populate
:
&
fn
(
block
,
ty
::
t
,
ValueRef
)
->
block
)
->
block
{
let
var_ty
=
node_id_type
(
bcx
,
p_id
);
...
...
@@ -1899,7 +1899,7 @@ fn bind_irrefutable_pat(bcx: block,
let
tcx
=
bcx
.tcx
();
let
ccx
=
bcx
.ccx
();
match
pat
.node
{
ast
::
pat_ident
(
pat_binding_mode
,
path
,
inner
)
=>
{
ast
::
pat_ident
(
pat_binding_mode
,
ref
path
,
inner
)
=>
{
if
pat_is_binding
(
tcx
.def_map
,
pat
)
{
// Allocate the stack slot where the value of this
// binding will live and place it into the appropriate
...
...
@@ -2017,9 +2017,9 @@ fn bind_irrefutable_pat(bcx: block,
return
bcx
;
}
fn
simple_identifier
(
pat
:
@
ast
::
pat
)
->
Option
<@
ast
::
Path
>
{
fn
simple_identifier
<
'a
>
(
pat
:
&
'a
ast
::
pat
)
->
Option
<&
'a
ast
::
Path
>
{
match
pat
.node
{
ast
::
pat_ident
(
ast
::
bind_infer
,
path
,
None
)
=>
{
ast
::
pat_ident
(
ast
::
bind_infer
,
ref
path
,
None
)
=>
{
Some
(
path
)
}
_
=>
{
...
...
src/librustc/middle/trans/base.rs
浏览文件 @
0c6d02f3
...
...
@@ -1969,17 +1969,17 @@ pub fn trans_tuple_struct(ccx: @mut CrateContext,
trait
IdAndTy
{
fn
id
(
&
self
)
->
ast
::
node_id
;
fn
ty
(
&
self
)
->
@
ast
::
Ty
;
fn
ty
<
'a
>
(
&
'a
self
)
->
&
'a
ast
::
Ty
;
}
impl
IdAndTy
for
ast
::
variant_arg
{
fn
id
(
&
self
)
->
ast
::
node_id
{
self
.id
}
fn
ty
(
&
self
)
->
@
ast
::
Ty
{
self
.ty
}
fn
ty
<
'a
>
(
&
'a
self
)
->
&
'a
ast
::
Ty
{
&
self
.ty
}
}
impl
IdAndTy
for
@
ast
::
struct_field
{
fn
id
(
&
self
)
->
ast
::
node_id
{
self
.node.id
}
fn
ty
(
&
self
)
->
@
ast
::
Ty
{
self
.node.ty
}
fn
ty
<
'a
>
(
&
'a
self
)
->
&
'a
ast
::
Ty
{
&
self
.node.ty
}
}
pub
fn
trans_enum_variant_or_tuple_like_struct
<
A
:
IdAndTy
>
(
...
...
@@ -1994,7 +1994,7 @@ pub fn trans_enum_variant_or_tuple_like_struct<A:IdAndTy>(
let
fn_args
=
do
args
.map
|
varg
|
{
ast
::
arg
{
is_mutbl
:
false
,
ty
:
varg
.ty
(),
ty
:
copy
*
varg
.ty
(),
pat
:
ast_util
::
ident_to_pat
(
ccx
.tcx.sess
.next_node_id
(),
codemap
::
dummy_sp
(),
...
...
@@ -2977,8 +2977,12 @@ pub fn trans_crate(sess: session::Session,
do
sort
::
quick_sort
(
ccx
.stats.fn_stats
)
|
&
(
_
,
_
,
insns_a
),
&
(
_
,
_
,
insns_b
)|
{
insns_a
>
insns_b
}
for
ccx
.stats.fn_stats
.iter
()
.advance
|
&
(
name
,
ms
,
insns
)|
{
io
::
println
(
fmt!
(
"%u insns, %u ms, %s"
,
insns
,
ms
,
name
));
for
ccx
.stats.fn_stats
.iter
()
.advance
|
tuple
|
{
match
*
tuple
{
(
ref
name
,
ms
,
insns
)
=>
{
io
::
println
(
fmt!
(
"%u insns, %u ms, %s"
,
insns
,
ms
,
*
name
));
}
}
}
}
if
ccx
.sess
.count_llvm_insns
()
{
...
...
src/librustc/middle/typeck/coherence.rs
浏览文件 @
0c6d02f3
...
...
@@ -209,7 +209,7 @@ pub fn check_coherence(self, crate: &crate) {
match
item
.node
{
item_impl
(
_
,
ref
opt_trait
,
_
,
_
)
=>
{
let
opt_trait
:
~
[
trait_ref
]
=
opt_trait
.iter
()
.transform
(|
&
x
|
x
)
.transform
(|
x
|
copy
*
x
)
.collect
();
self
.check_implementation
(
item
,
opt_trait
);
}
...
...
@@ -270,7 +270,7 @@ pub fn check_implementation(&self,
// We only want to generate one Impl structure. When we generate one,
// we store it here so that we don't recreate it.
let
mut
implementation_opt
=
None
;
for
associated_traits
.iter
()
.advance
|
&
associated_trait
|
{
for
associated_traits
.iter
()
.advance
|
associated_trait
|
{
let
trait_ref
=
ty
::
node_id_to_trait_ref
(
self
.crate_context.tcx
,
...
...
src/libstd/vec.rs
浏览文件 @
0c6d02f3
...
...
@@ -1277,7 +1277,7 @@ fn pop_opt(&mut self) -> Option<T> {
let
valptr
=
ptr
::
to_mut_unsafe_ptr
(
&
mut
self
[
ln
-
1u
]);
unsafe
{
raw
::
set_len
(
self
,
ln
-
1u
);
ptr
::
read_ptr
(
valptr
)
Some
(
ptr
::
read_ptr
(
valptr
)
)
}
}
}
...
...
src/libsyntax/ext/deriving/generic.rs
浏览文件 @
0c6d02f3
...
...
@@ -519,8 +519,8 @@ fn create_method(&self, cx: @ExtCtxt, span: span,
// create the generics that aren't for Self
let
fn_generics
=
self
.generics
.to_generics
(
cx
,
span
,
type_ident
,
generics
);
let
args
=
do
arg_types
.map
|
&
(
id
,
ty
)
|
{
cx
.arg
(
span
,
id
,
ty
)
let
args
=
do
arg_types
.map
|
pair
|
{
cx
.arg
(
span
,
pair
.first
(),
pair
.second
()
)
};
let
ret_type
=
self
.get_ret_ty
(
cx
,
span
,
generics
,
type_ident
);
...
...
@@ -896,8 +896,8 @@ pub fn create_subpatterns(cx: @ExtCtxt,
field_paths
:
~
[
ast
::
Path
],
mutbl
:
ast
::
mutability
)
->
~
[
@
ast
::
pat
]
{
do
field_paths
.map
|
&
path
|
{
cx
.pat
(
span
,
ast
::
pat_ident
(
ast
::
bind_by_ref
(
mutbl
),
path
,
None
))
do
field_paths
.map
|
path
|
{
cx
.pat
(
span
,
ast
::
pat_ident
(
ast
::
bind_by_ref
(
mutbl
),
copy
*
path
,
None
))
}
}
...
...
src/libsyntax/ext/pipes/pipec.rs
浏览文件 @
0c6d02f3
...
...
@@ -137,7 +137,7 @@ fn gen_send(&mut self, cx: @ExtCtxt, try: bool) -> @ast::item {
let
arg_names
=
vec
::
from_fn
(
tys
.len
(),
|
i
|
"x_"
+
i
.to_str
());
let
args_ast
:
~
[
ast
::
arg
]
=
arg_names
.iter
()
.zip
(
tys
.iter
())
.transform
(|(
&
n
,
t
)|
cx
.arg
(
span
,
cx
.ident_of
(
n
),
copy
*
t
))
.collect
();
.transform
(|(
n
,
t
)|
cx
.arg
(
span
,
cx
.ident_of
(
*
n
),
copy
*
t
))
.collect
();
let
args_ast
=
vec
::
append
(
~
[
cx
.arg
(
span
,
...
...
src/libsyntax/parse/parser.rs
浏览文件 @
0c6d02f3
...
...
@@ -3914,7 +3914,7 @@ fn eval_src_mod_from_path(&self, prefix: Path, path: Path,
};
let
full_path
=
full_path
.normalize
();
let
maybe_i
=
do
self
.sess.included_mod_stack
.iter
()
.position
|
&
p
|
{
p
==
full_path
};
let
maybe_i
=
do
self
.sess.included_mod_stack
.iter
()
.position
|
p
|
{
*
p
==
full_path
};
match
maybe_i
{
Some
(
i
)
=>
{
let
stack
=
&
self
.sess.included_mod_stack
;
...
...
src/libsyntax/print/pprust.rs
浏览文件 @
0c6d02f3
...
...
@@ -1526,7 +1526,7 @@ pub fn print_bounded_path(s: @ps, path: &ast::Path,
print_path_
(
s
,
path
,
false
,
bounds
)
}
pub
fn
print_pat
(
s
:
@
ps
,
pat
:
@
ast
::
pat
)
{
pub
fn
print_pat
(
s
:
@
ps
,
pat
:
&
ast
::
pat
)
{
maybe_print_comment
(
s
,
pat
.span.lo
);
let
ann_node
=
node_pat
(
s
,
pat
);
(
s
.ann.pre
)(
ann_node
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录