Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
e4b913f6
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,发现更多精彩内容 >>
提交
e4b913f6
编写于
10月 24, 2014
作者:
N
Nick Cameron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
s/vtable2/vtable
上级
091b9811
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
12 addition
and
12 deletion
+12
-12
src/librustc/middle/typeck/check/method.rs
src/librustc/middle/typeck/check/method.rs
+1
-1
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/check/mod.rs
+7
-7
src/librustc/middle/typeck/check/regionck.rs
src/librustc/middle/typeck/check/regionck.rs
+2
-2
src/librustc/middle/typeck/check/vtable.rs
src/librustc/middle/typeck/check/vtable.rs
+0
-0
src/librustc/middle/typeck/check/wf.rs
src/librustc/middle/typeck/check/wf.rs
+2
-2
未找到文件。
src/librustc/middle/typeck/check/method.rs
浏览文件 @
e4b913f6
...
...
@@ -88,7 +88,7 @@ trait `ToString` imported, and I call `to_string()` on a value of type `T`,
use
middle
::
typeck
::
astconv
::
AstConv
;
use
middle
::
typeck
::
check
::{
FnCtxt
,
NoPreference
,
PreferMutLvalue
};
use
middle
::
typeck
::
check
::{
impl_self_ty
};
use
middle
::
typeck
::
check
::
vtable
2
::
select_fcx_obligations_where_possible
;
use
middle
::
typeck
::
check
::
vtable
::
select_fcx_obligations_where_possible
;
use
middle
::
typeck
::
check
;
use
middle
::
typeck
::
infer
;
use
middle
::
typeck
::{
MethodCall
,
MethodCallee
};
...
...
src/librustc/middle/typeck/check/mod.rs
浏览文件 @
e4b913f6
...
...
@@ -139,7 +139,7 @@
use
syntax
;
pub
mod
_
match
;
pub
mod
vtable
2
;
// New trait code
pub
mod
vtable
;
pub
mod
writeback
;
pub
mod
regionmanip
;
pub
mod
regionck
;
...
...
@@ -409,7 +409,7 @@ fn check_bare_fn(ccx: &CrateCtxt,
let
fcx
=
check_fn
(
ccx
,
fn_ty
.fn_style
,
id
,
&
fn_ty
.sig
,
decl
,
id
,
body
,
&
inh
);
vtable
2
::
select_all_fcx_obligations_or_error
(
&
fcx
);
vtable
::
select_all_fcx_obligations_or_error
(
&
fcx
);
regionck
::
regionck_fn
(
&
fcx
,
id
,
body
);
writeback
::
resolve_type_vars_in_fn
(
&
fcx
,
decl
,
body
);
}
...
...
@@ -1377,7 +1377,7 @@ fn check_cast(fcx: &FnCtxt,
if
ty
::
type_is_trait
(
t_1
)
{
// This will be looked up later on.
vtable
2
::
check_object_cast
(
fcx
,
cast_expr
,
e
,
t_1
);
vtable
::
check_object_cast
(
fcx
,
cast_expr
,
e
,
t_1
);
fcx
.write_ty
(
id
,
t_1
);
return
}
...
...
@@ -1682,7 +1682,7 @@ fn register_unsize_obligations(&self,
ty
::
UnsizeVtable
(
ref
ty_trait
,
self_ty
)
=>
{
// If the type is `Foo+'a`, ensures that the type
// being cast to `Foo+'a` implements `Foo`:
vtable
2
::
register_object_cast_obligations
(
self
,
vtable
::
register_object_cast_obligations
(
self
,
span
,
ty_trait
,
self_ty
);
...
...
@@ -2565,7 +2565,7 @@ fn check_argument_types<'a>(fcx: &FnCtxt,
// an "opportunistic" vtable resolution of any trait
// bounds on the call.
if
check_blocks
{
vtable
2
::
select_fcx_obligations_where_possible
(
fcx
);
vtable
::
select_fcx_obligations_where_possible
(
fcx
);
}
// For variadic functions, we don't have a declared type for all of
...
...
@@ -4037,7 +4037,7 @@ fn check_struct_fields_on_error(fcx: &FnCtxt,
ast
::
ExprForLoop
(
ref
pat
,
ref
head
,
ref
block
,
_
)
=>
{
check_expr
(
fcx
,
&**
head
);
let
typ
=
lookup_method_for_for_loop
(
fcx
,
&**
head
,
expr
.id
);
vtable
2
::
select_fcx_obligations_where_possible
(
fcx
);
vtable
::
select_fcx_obligations_where_possible
(
fcx
);
let
pcx
=
pat_ctxt
{
fcx
:
fcx
,
...
...
@@ -4744,7 +4744,7 @@ pub fn check_const_with_ty(fcx: &FnCtxt,
check_expr_with_hint
(
fcx
,
e
,
declty
);
demand
::
coerce
(
fcx
,
e
.span
,
declty
,
e
);
vtable
2
::
select_all_fcx_obligations_or_error
(
fcx
);
vtable
::
select_all_fcx_obligations_or_error
(
fcx
);
regionck
::
regionck_expr
(
fcx
,
e
);
writeback
::
resolve_type_vars_in_expr
(
fcx
,
e
);
}
...
...
src/librustc/middle/typeck/check/regionck.rs
浏览文件 @
e4b913f6
...
...
@@ -126,7 +126,7 @@ fn get_i(x: &'a Bar) -> &'a int {
use
middle
::
typeck
::
astconv
::
AstConv
;
use
middle
::
typeck
::
check
::
FnCtxt
;
use
middle
::
typeck
::
check
::
regionmanip
;
use
middle
::
typeck
::
check
::
vtable
2
;
use
middle
::
typeck
::
check
::
vtable
;
use
middle
::
typeck
::
infer
::
resolve_and_force_all_but_regions
;
use
middle
::
typeck
::
infer
::
resolve_type
;
use
middle
::
typeck
::
infer
;
...
...
@@ -172,7 +172,7 @@ pub fn regionck_fn(fcx: &FnCtxt, id: ast::NodeId, blk: &ast::Block) {
// Region checking a fn can introduce new trait obligations,
// particularly around closure bounds.
vtable
2
::
select_all_fcx_obligations_or_error
(
fcx
);
vtable
::
select_all_fcx_obligations_or_error
(
fcx
);
fcx
.infcx
()
.resolve_regions_and_report_errors
();
}
...
...
src/librustc/middle/typeck/check/vtable
2
.rs
→
src/librustc/middle/typeck/check/vtable.rs
浏览文件 @
e4b913f6
文件已移动
src/librustc/middle/typeck/check/wf.rs
浏览文件 @
e4b913f6
...
...
@@ -14,7 +14,7 @@
use
middle
::
ty
;
use
middle
::
ty_fold
::{
TypeFolder
,
TypeFoldable
};
use
middle
::
typeck
::
astconv
::
AstConv
;
use
middle
::
typeck
::
check
::{
FnCtxt
,
Inherited
,
blank_fn_ctxt
,
vtable
2
,
regionck
};
use
middle
::
typeck
::
check
::{
FnCtxt
,
Inherited
,
blank_fn_ctxt
,
vtable
,
regionck
};
use
middle
::
typeck
::
check
::
regionmanip
::
replace_late_bound_regions
;
use
middle
::
typeck
::
CrateCtxt
;
use
util
::
ppaux
::
Repr
;
...
...
@@ -100,7 +100,7 @@ fn with_fcx(&mut self,
let
inh
=
Inherited
::
new
(
ccx
.tcx
,
param_env
);
let
fcx
=
blank_fn_ctxt
(
ccx
,
&
inh
,
polytype
.ty
,
item
.id
);
f
(
self
,
&
fcx
);
vtable
2
::
select_all_fcx_obligations_or_error
(
&
fcx
);
vtable
::
select_all_fcx_obligations_or_error
(
&
fcx
);
regionck
::
regionck_item
(
&
fcx
,
item
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录