Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
2332765c
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,发现更多精彩内容 >>
提交
2332765c
编写于
6月 24, 2015
作者:
E
Eduard Burtescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rustc: prefer unqualified `ctxt` to `ty::ctxt` in middle::ty.
上级
59935f70
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
src/librustc/middle/ty.rs
src/librustc/middle/ty.rs
+17
-17
未找到文件。
src/librustc/middle/ty.rs
浏览文件 @
2332765c
...
...
@@ -2063,7 +2063,7 @@ pub fn empty() -> GenericPredicates<'tcx> {
}
}
pub
fn
instantiate
(
&
self
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
substs
:
&
Substs
<
'tcx
>
)
pub
fn
instantiate
(
&
self
,
tcx
:
&
ctxt
<
'tcx
>
,
substs
:
&
Substs
<
'tcx
>
)
->
InstantiatedPredicates
<
'tcx
>
{
InstantiatedPredicates
{
predicates
:
self
.predicates
.subst
(
tcx
,
substs
),
...
...
@@ -2071,7 +2071,7 @@ pub fn instantiate(&self, tcx: &ty::ctxt<'tcx>, substs: &Substs<'tcx>)
}
pub
fn
instantiate_supertrait
(
&
self
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
poly_trait_ref
:
&
ty
::
PolyTraitRef
<
'tcx
>
)
->
InstantiatedPredicates
<
'tcx
>
{
...
...
@@ -2109,7 +2109,7 @@ impl<'tcx> Predicate<'tcx> {
/// substitution in terms of what happens with bound regions. See
/// lengthy comment below for details.
pub
fn
subst_supertrait
(
&
self
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
trait_ref
:
&
ty
::
PolyTraitRef
<
'tcx
>
)
->
ty
::
Predicate
<
'tcx
>
{
...
...
@@ -2876,7 +2876,7 @@ pub fn extends(self, other: ty::ClosureKind) -> bool {
}
pub
trait
ClosureTyper
<
'tcx
>
{
fn
tcx
(
&
self
)
->
&
ty
::
ctxt
<
'tcx
>
{
fn
tcx
(
&
self
)
->
&
ctxt
<
'tcx
>
{
self
.param_env
()
.tcx
}
...
...
@@ -3585,7 +3585,7 @@ pub fn for_def(def: &TypeParameterDef) -> ParamTy {
ParamTy
::
new
(
def
.space
,
def
.index
,
def
.name
)
}
pub
fn
to_ty
<
'tcx
>
(
self
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
)
->
Ty
<
'tcx
>
{
pub
fn
to_ty
<
'tcx
>
(
self
,
tcx
:
&
ctxt
<
'tcx
>
)
->
Ty
<
'tcx
>
{
ty
::
mk_param
(
tcx
,
self
.space
,
self
.idx
,
self
.name
)
}
...
...
@@ -4108,7 +4108,7 @@ fn object_contents(bounds: &ExistentialBounds) -> TypeContents {
}
fn
type_impls_bound
<
'a
,
'tcx
>
(
param_env
:
Option
<&
ParameterEnvironment
<
'a
,
'tcx
>>
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
ty
:
Ty
<
'tcx
>
,
bound
:
ty
::
BuiltinBound
,
span
:
Span
)
...
...
@@ -4178,7 +4178,7 @@ pub fn type_moves_by_default<'a,'tcx>(param_env: &ParameterEnvironment<'a,'tcx>,
#[inline]
pub
fn
type_is_sized
<
'a
,
'tcx
>
(
param_env
:
Option
<&
ParameterEnvironment
<
'a
,
'tcx
>>
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
span
:
Span
,
ty
:
Ty
<
'tcx
>
)
->
bool
...
...
@@ -4192,7 +4192,7 @@ pub fn type_is_sized<'a,'tcx>(param_env: Option<&ParameterEnvironment<'a,'tcx>>,
}
fn
type_is_sized_uncached
<
'a
,
'tcx
>
(
param_env
:
Option
<&
ParameterEnvironment
<
'a
,
'tcx
>>
,
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
span
:
Span
,
ty
:
Ty
<
'tcx
>
)
->
bool
{
assert
!
(
!
ty
.needs_infer
());
...
...
@@ -6703,7 +6703,7 @@ fn push_region_params(regions: &mut VecPerParamSpace<ty::Region>,
}
}
fn
push_types_from_defs
<
'tcx
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
fn
push_types_from_defs
<
'tcx
>
(
tcx
:
&
ctxt
<
'tcx
>
,
types
:
&
mut
VecPerParamSpace
<
Ty
<
'tcx
>>
,
defs
:
&
[
TypeParameterDef
<
'tcx
>
])
{
for
def
in
defs
{
...
...
@@ -6966,7 +6966,7 @@ pub struct Freevar {
// imported.
pub
type
GlobMap
=
HashMap
<
NodeId
,
HashSet
<
Name
>>
;
pub
fn
with_freevars
<
T
,
F
>
(
tcx
:
&
ty
::
ctxt
,
fid
:
ast
::
NodeId
,
f
:
F
)
->
T
where
pub
fn
with_freevars
<
T
,
F
>
(
tcx
:
&
ctxt
,
fid
:
ast
::
NodeId
,
f
:
F
)
->
T
where
F
:
FnOnce
(
&
[
Freevar
])
->
T
,
{
match
tcx
.freevars
.borrow
()
.get
(
&
fid
)
{
...
...
@@ -6994,7 +6994,7 @@ pub fn is_identity(&self) -> bool {
/// Replace any late-bound regions bound in `value` with free variants attached to scope-id
/// `scope_id`.
pub
fn
liberate_late_bound_regions
<
'tcx
,
T
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
all_outlive_scope
:
region
::
DestructionScopeData
,
value
:
&
Binder
<
T
>
)
->
T
...
...
@@ -7006,7 +7006,7 @@ pub fn liberate_late_bound_regions<'tcx, T>(
}
pub
fn
count_late_bound_regions
<
'tcx
,
T
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
value
:
&
Binder
<
T
>
)
->
usize
where
T
:
TypeFoldable
<
'tcx
>
...
...
@@ -7016,7 +7016,7 @@ pub fn count_late_bound_regions<'tcx, T>(
}
pub
fn
binds_late_bound_regions
<
'tcx
,
T
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
value
:
&
Binder
<
T
>
)
->
bool
where
T
:
TypeFoldable
<
'tcx
>
...
...
@@ -7027,7 +7027,7 @@ pub fn binds_late_bound_regions<'tcx, T>(
/// Flattens two binding levels into one. So `for<'a> for<'b> Foo`
/// becomes `for<'a,'b> Foo`.
pub
fn
flatten_late_bound_regions
<
'tcx
,
T
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
bound2_value
:
&
Binder
<
Binder
<
T
>>
)
->
Binder
<
T
>
where
T
:
TypeFoldable
<
'tcx
>
...
...
@@ -7049,7 +7049,7 @@ pub fn flatten_late_bound_regions<'tcx, T>(
}
pub
fn
no_late_bound_regions
<
'tcx
,
T
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
value
:
&
Binder
<
T
>
)
->
Option
<
T
>
where
T
:
TypeFoldable
<
'tcx
>
...
...
@@ -7064,7 +7064,7 @@ pub fn no_late_bound_regions<'tcx, T>(
/// Replace any late-bound regions bound in `value` with `'static`. Useful in trans but also
/// method lookup and a few other places where precise region relationships are not required.
pub
fn
erase_late_bound_regions
<
'tcx
,
T
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
tcx
:
&
ctxt
<
'tcx
>
,
value
:
&
Binder
<
T
>
)
->
T
where
T
:
TypeFoldable
<
'tcx
>
...
...
@@ -7147,7 +7147,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
}
}
pub
fn
make_substs_for_receiver_types
<
'tcx
>
(
tcx
:
&
ty
::
ctxt
<
'tcx
>
,
pub
fn
make_substs_for_receiver_types
<
'tcx
>
(
tcx
:
&
ctxt
<
'tcx
>
,
trait_ref
:
&
ty
::
TraitRef
<
'tcx
>
,
method
:
&
ty
::
Method
<
'tcx
>
)
->
subst
::
Substs
<
'tcx
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录