Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3dd303aa
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,发现更多精彩内容 >>
提交
3dd303aa
编写于
10月 23, 2018
作者:
S
scalexm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename `BoundTyIndex` to `BoundVar`
上级
d0447550
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
27 addition
and
27 deletion
+27
-27
src/librustc/ich/impls_ty.rs
src/librustc/ich/impls_ty.rs
+1
-1
src/librustc/infer/canonical/canonicalizer.rs
src/librustc/infer/canonical/canonicalizer.rs
+7
-7
src/librustc/infer/canonical/mod.rs
src/librustc/infer/canonical/mod.rs
+5
-5
src/librustc/infer/canonical/query_response.rs
src/librustc/infer/canonical/query_response.rs
+7
-7
src/librustc/ty/mod.rs
src/librustc/ty/mod.rs
+1
-1
src/librustc/ty/sty.rs
src/librustc/ty/sty.rs
+4
-4
src/librustc/ty/subst.rs
src/librustc/ty/subst.rs
+2
-2
未找到文件。
src/librustc/ich/impls_ty.rs
浏览文件 @
3dd303aa
...
@@ -147,7 +147,7 @@ fn hash_stable<W: StableHasherResult>(&self,
...
@@ -147,7 +147,7 @@ fn hash_stable<W: StableHasherResult>(&self,
}
}
}
}
impl
<
'gcx
>
HashStable
<
StableHashingContext
<
'gcx
>>
for
ty
::
Bound
TyIndex
{
impl
<
'gcx
>
HashStable
<
StableHashingContext
<
'gcx
>>
for
ty
::
Bound
Var
{
#[inline]
#[inline]
fn
hash_stable
<
W
:
StableHasherResult
>
(
&
self
,
fn
hash_stable
<
W
:
StableHasherResult
>
(
&
self
,
hcx
:
&
mut
StableHashingContext
<
'gcx
>
,
hcx
:
&
mut
StableHashingContext
<
'gcx
>
,
...
...
src/librustc/infer/canonical/canonicalizer.rs
浏览文件 @
3dd303aa
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
use
std
::
sync
::
atomic
::
Ordering
;
use
std
::
sync
::
atomic
::
Ordering
;
use
ty
::
fold
::{
TypeFoldable
,
TypeFolder
};
use
ty
::
fold
::{
TypeFoldable
,
TypeFolder
};
use
ty
::
subst
::
Kind
;
use
ty
::
subst
::
Kind
;
use
ty
::{
self
,
BoundTy
,
Bound
TyIndex
,
Lift
,
List
,
Ty
,
TyCtxt
,
TypeFlags
};
use
ty
::{
self
,
BoundTy
,
Bound
Var
,
Lift
,
List
,
Ty
,
TyCtxt
,
TypeFlags
};
use
rustc_data_structures
::
fx
::
FxHashMap
;
use
rustc_data_structures
::
fx
::
FxHashMap
;
use
rustc_data_structures
::
indexed_vec
::
Idx
;
use
rustc_data_structures
::
indexed_vec
::
Idx
;
...
@@ -277,7 +277,7 @@ struct Canonicalizer<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
...
@@ -277,7 +277,7 @@ struct Canonicalizer<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
query_state
:
&
'cx
mut
OriginalQueryValues
<
'tcx
>
,
query_state
:
&
'cx
mut
OriginalQueryValues
<
'tcx
>
,
// Note that indices is only used once `var_values` is big enough to be
// Note that indices is only used once `var_values` is big enough to be
// heap-allocated.
// heap-allocated.
indices
:
FxHashMap
<
Kind
<
'tcx
>
,
Bound
TyIndex
>
,
indices
:
FxHashMap
<
Kind
<
'tcx
>
,
Bound
Var
>
,
canonicalize_region_mode
:
&
'cx
dyn
CanonicalizeRegionMode
,
canonicalize_region_mode
:
&
'cx
dyn
CanonicalizeRegionMode
,
needs_canonical_flags
:
TypeFlags
,
needs_canonical_flags
:
TypeFlags
,
}
}
...
@@ -455,7 +455,7 @@ fn canonicalize<V>(
...
@@ -455,7 +455,7 @@ fn canonicalize<V>(
/// or returns an existing variable if `kind` has already been
/// or returns an existing variable if `kind` has already been
/// seen. `kind` is expected to be an unbound variable (or
/// seen. `kind` is expected to be an unbound variable (or
/// potentially a free region).
/// potentially a free region).
fn
canonical_var
(
&
mut
self
,
info
:
CanonicalVarInfo
,
kind
:
Kind
<
'tcx
>
)
->
Bound
TyIndex
{
fn
canonical_var
(
&
mut
self
,
info
:
CanonicalVarInfo
,
kind
:
Kind
<
'tcx
>
)
->
Bound
Var
{
let
Canonicalizer
{
let
Canonicalizer
{
variables
,
variables
,
query_state
,
query_state
,
...
@@ -475,7 +475,7 @@ fn canonical_var(&mut self, info: CanonicalVarInfo, kind: Kind<'tcx>) -> BoundTy
...
@@ -475,7 +475,7 @@ fn canonical_var(&mut self, info: CanonicalVarInfo, kind: Kind<'tcx>) -> BoundTy
// direct linear search of `var_values`.
// direct linear search of `var_values`.
if
let
Some
(
idx
)
=
var_values
.iter
()
.position
(|
&
k
|
k
==
kind
)
{
if
let
Some
(
idx
)
=
var_values
.iter
()
.position
(|
&
k
|
k
==
kind
)
{
// `kind` is already present in `var_values`.
// `kind` is already present in `var_values`.
Bound
TyIndex
::
new
(
idx
)
Bound
Var
::
new
(
idx
)
}
else
{
}
else
{
// `kind` isn't present in `var_values`. Append it. Likewise
// `kind` isn't present in `var_values`. Append it. Likewise
// for `info` and `variables`.
// for `info` and `variables`.
...
@@ -490,11 +490,11 @@ fn canonical_var(&mut self, info: CanonicalVarInfo, kind: Kind<'tcx>) -> BoundTy
...
@@ -490,11 +490,11 @@ fn canonical_var(&mut self, info: CanonicalVarInfo, kind: Kind<'tcx>) -> BoundTy
*
indices
=
var_values
*
indices
=
var_values
.iter
()
.iter
()
.enumerate
()
.enumerate
()
.map
(|(
i
,
&
kind
)|
(
kind
,
Bound
TyIndex
::
new
(
i
)))
.map
(|(
i
,
&
kind
)|
(
kind
,
Bound
Var
::
new
(
i
)))
.collect
();
.collect
();
}
}
// The cv is the index of the appended element.
// The cv is the index of the appended element.
Bound
TyIndex
::
new
(
var_values
.len
()
-
1
)
Bound
Var
::
new
(
var_values
.len
()
-
1
)
}
}
}
else
{
}
else
{
// `var_values` is large. Do a hashmap search via `indices`.
// `var_values` is large. Do a hashmap search via `indices`.
...
@@ -502,7 +502,7 @@ fn canonical_var(&mut self, info: CanonicalVarInfo, kind: Kind<'tcx>) -> BoundTy
...
@@ -502,7 +502,7 @@ fn canonical_var(&mut self, info: CanonicalVarInfo, kind: Kind<'tcx>) -> BoundTy
variables
.push
(
info
);
variables
.push
(
info
);
var_values
.push
(
kind
);
var_values
.push
(
kind
);
assert_eq!
(
variables
.len
(),
var_values
.len
());
assert_eq!
(
variables
.len
(),
var_values
.len
());
Bound
TyIndex
::
new
(
variables
.len
()
-
1
)
Bound
Var
::
new
(
variables
.len
()
-
1
)
})
})
};
};
...
...
src/librustc/infer/canonical/mod.rs
浏览文件 @
3dd303aa
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
use
syntax
::
source_map
::
Span
;
use
syntax
::
source_map
::
Span
;
use
ty
::
fold
::
TypeFoldable
;
use
ty
::
fold
::
TypeFoldable
;
use
ty
::
subst
::
Kind
;
use
ty
::
subst
::
Kind
;
use
ty
::{
self
,
Bound
TyIndex
,
Lift
,
List
,
Region
,
TyCtxt
};
use
ty
::{
self
,
Bound
Var
,
Lift
,
List
,
Region
,
TyCtxt
};
mod
canonicalizer
;
mod
canonicalizer
;
...
@@ -73,7 +73,7 @@ impl<'gcx> UseSpecializedDecodable for CanonicalVarInfos<'gcx> {}
...
@@ -73,7 +73,7 @@ impl<'gcx> UseSpecializedDecodable for CanonicalVarInfos<'gcx> {}
/// canonicalized query response.
/// canonicalized query response.
#[derive(Clone,
Debug,
PartialEq,
Eq,
Hash,
RustcDecodable,
RustcEncodable)]
#[derive(Clone,
Debug,
PartialEq,
Eq,
Hash,
RustcDecodable,
RustcEncodable)]
pub
struct
CanonicalVarValues
<
'tcx
>
{
pub
struct
CanonicalVarValues
<
'tcx
>
{
pub
var_values
:
IndexVec
<
Bound
TyIndex
,
Kind
<
'tcx
>>
,
pub
var_values
:
IndexVec
<
Bound
Var
,
Kind
<
'tcx
>>
,
}
}
/// When we canonicalize a value to form a query, we wind up replacing
/// When we canonicalize a value to form a query, we wind up replacing
...
@@ -337,7 +337,7 @@ fn instantiate_canonical_vars(
...
@@ -337,7 +337,7 @@ fn instantiate_canonical_vars(
variables
:
&
List
<
CanonicalVarInfo
>
,
variables
:
&
List
<
CanonicalVarInfo
>
,
universe_map
:
impl
Fn
(
ty
::
UniverseIndex
)
->
ty
::
UniverseIndex
,
universe_map
:
impl
Fn
(
ty
::
UniverseIndex
)
->
ty
::
UniverseIndex
,
)
->
CanonicalVarValues
<
'tcx
>
{
)
->
CanonicalVarValues
<
'tcx
>
{
let
var_values
:
IndexVec
<
Bound
TyIndex
,
Kind
<
'tcx
>>
=
variables
let
var_values
:
IndexVec
<
Bound
Var
,
Kind
<
'tcx
>>
=
variables
.iter
()
.iter
()
.map
(|
info
|
self
.instantiate_canonical_var
(
span
,
*
info
,
&
universe_map
))
.map
(|
info
|
self
.instantiate_canonical_var
(
span
,
*
info
,
&
universe_map
))
.collect
();
.collect
();
...
@@ -456,10 +456,10 @@ impl<'a, 'tcx, R> Lift<'tcx> for QueryResponse<'a, R> {
...
@@ -456,10 +456,10 @@ impl<'a, 'tcx, R> Lift<'tcx> for QueryResponse<'a, R> {
}
where
R
:
Lift
<
'tcx
>
}
where
R
:
Lift
<
'tcx
>
}
}
impl
<
'tcx
>
Index
<
Bound
TyIndex
>
for
CanonicalVarValues
<
'tcx
>
{
impl
<
'tcx
>
Index
<
Bound
Var
>
for
CanonicalVarValues
<
'tcx
>
{
type
Output
=
Kind
<
'tcx
>
;
type
Output
=
Kind
<
'tcx
>
;
fn
index
(
&
self
,
value
:
Bound
TyIndex
)
->
&
Kind
<
'tcx
>
{
fn
index
(
&
self
,
value
:
Bound
Var
)
->
&
Kind
<
'tcx
>
{
&
self
.var_values
[
value
]
&
self
.var_values
[
value
]
}
}
}
}
src/librustc/infer/canonical/query_response.rs
浏览文件 @
3dd303aa
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
use
traits
::{
Obligation
,
ObligationCause
,
PredicateObligation
};
use
traits
::{
Obligation
,
ObligationCause
,
PredicateObligation
};
use
ty
::
fold
::
TypeFoldable
;
use
ty
::
fold
::
TypeFoldable
;
use
ty
::
subst
::{
Kind
,
UnpackedKind
};
use
ty
::
subst
::{
Kind
,
UnpackedKind
};
use
ty
::{
self
,
Bound
TyIndex
,
Lift
,
Ty
,
TyCtxt
};
use
ty
::{
self
,
Bound
Var
,
Lift
,
Ty
,
TyCtxt
};
impl
<
'cx
,
'gcx
,
'tcx
>
InferCtxtBuilder
<
'cx
,
'gcx
,
'tcx
>
{
impl
<
'cx
,
'gcx
,
'tcx
>
InferCtxtBuilder
<
'cx
,
'gcx
,
'tcx
>
{
/// The "main method" for a canonicalized trait query. Given the
/// The "main method" for a canonicalized trait query. Given the
...
@@ -273,7 +273,7 @@ pub fn instantiate_nll_query_response_and_region_obligations<R>(
...
@@ -273,7 +273,7 @@ pub fn instantiate_nll_query_response_and_region_obligations<R>(
for
(
index
,
original_value
)
in
original_values
.var_values
.iter
()
.enumerate
()
{
for
(
index
,
original_value
)
in
original_values
.var_values
.iter
()
.enumerate
()
{
// ...with the value `v_r` of that variable from the query.
// ...with the value `v_r` of that variable from the query.
let
result_value
=
query_response
.substitute_projected
(
self
.tcx
,
&
result_subst
,
|
v
|
{
let
result_value
=
query_response
.substitute_projected
(
self
.tcx
,
&
result_subst
,
|
v
|
{
&
v
.var_values
[
Bound
TyIndex
::
new
(
index
)]
&
v
.var_values
[
Bound
Var
::
new
(
index
)]
});
});
match
(
original_value
.unpack
(),
result_value
.unpack
())
{
match
(
original_value
.unpack
(),
result_value
.unpack
())
{
(
UnpackedKind
::
Lifetime
(
ty
::
ReErased
),
UnpackedKind
::
Lifetime
(
ty
::
ReErased
))
=>
{
(
UnpackedKind
::
Lifetime
(
ty
::
ReErased
),
UnpackedKind
::
Lifetime
(
ty
::
ReErased
))
=>
{
...
@@ -423,7 +423,7 @@ fn query_response_substitution_guess<R>(
...
@@ -423,7 +423,7 @@ fn query_response_substitution_guess<R>(
// is directly equal to one of the canonical variables in the
// is directly equal to one of the canonical variables in the
// result, then we can type the corresponding value from the
// result, then we can type the corresponding value from the
// input. See the example above.
// input. See the example above.
let
mut
opt_values
:
IndexVec
<
Bound
TyIndex
,
Option
<
Kind
<
'tcx
>>>
=
let
mut
opt_values
:
IndexVec
<
Bound
Var
,
Option
<
Kind
<
'tcx
>>>
=
IndexVec
::
from_elem_n
(
None
,
query_response
.variables
.len
());
IndexVec
::
from_elem_n
(
None
,
query_response
.variables
.len
());
// In terms of our example above, we are iterating over pairs like:
// In terms of our example above, we are iterating over pairs like:
...
@@ -457,7 +457,7 @@ fn query_response_substitution_guess<R>(
...
@@ -457,7 +457,7 @@ fn query_response_substitution_guess<R>(
.enumerate
()
.enumerate
()
.map
(|(
index
,
info
)|
{
.map
(|(
index
,
info
)|
{
if
info
.is_existential
()
{
if
info
.is_existential
()
{
match
opt_values
[
Bound
TyIndex
::
new
(
index
)]
{
match
opt_values
[
Bound
Var
::
new
(
index
)]
{
Some
(
k
)
=>
k
,
Some
(
k
)
=>
k
,
None
=>
self
.instantiate_canonical_var
(
cause
.span
,
*
info
,
|
u
|
{
None
=>
self
.instantiate_canonical_var
(
cause
.span
,
*
info
,
|
u
|
{
universe_map
[
u
.as_usize
()]
universe_map
[
u
.as_usize
()]
...
@@ -496,7 +496,7 @@ fn unify_query_response_substitution_guess<R>(
...
@@ -496,7 +496,7 @@ fn unify_query_response_substitution_guess<R>(
// canonical variable; this is taken from
// canonical variable; this is taken from
// `query_response.var_values` after applying the substitution
// `query_response.var_values` after applying the substitution
// `result_subst`.
// `result_subst`.
let
substituted_query_response
=
|
index
:
Bound
TyIndex
|
->
Kind
<
'tcx
>
{
let
substituted_query_response
=
|
index
:
Bound
Var
|
->
Kind
<
'tcx
>
{
query_response
.substitute_projected
(
self
.tcx
,
&
result_subst
,
|
v
|
&
v
.var_values
[
index
])
query_response
.substitute_projected
(
self
.tcx
,
&
result_subst
,
|
v
|
&
v
.var_values
[
index
])
};
};
...
@@ -552,12 +552,12 @@ fn unify_canonical_vars(
...
@@ -552,12 +552,12 @@ fn unify_canonical_vars(
cause
:
&
ObligationCause
<
'tcx
>
,
cause
:
&
ObligationCause
<
'tcx
>
,
param_env
:
ty
::
ParamEnv
<
'tcx
>
,
param_env
:
ty
::
ParamEnv
<
'tcx
>
,
variables1
:
&
OriginalQueryValues
<
'tcx
>
,
variables1
:
&
OriginalQueryValues
<
'tcx
>
,
variables2
:
impl
Fn
(
Bound
TyIndex
)
->
Kind
<
'tcx
>
,
variables2
:
impl
Fn
(
Bound
Var
)
->
Kind
<
'tcx
>
,
)
->
InferResult
<
'tcx
,
()
>
{
)
->
InferResult
<
'tcx
,
()
>
{
self
.commit_if_ok
(|
_
|
{
self
.commit_if_ok
(|
_
|
{
let
mut
obligations
=
vec!
[];
let
mut
obligations
=
vec!
[];
for
(
index
,
value1
)
in
variables1
.var_values
.iter
()
.enumerate
()
{
for
(
index
,
value1
)
in
variables1
.var_values
.iter
()
.enumerate
()
{
let
value2
=
variables2
(
Bound
TyIndex
::
new
(
index
));
let
value2
=
variables2
(
Bound
Var
::
new
(
index
));
match
(
value1
.unpack
(),
value2
.unpack
())
{
match
(
value1
.unpack
(),
value2
.unpack
())
{
(
UnpackedKind
::
Type
(
v1
),
UnpackedKind
::
Type
(
v2
))
=>
{
(
UnpackedKind
::
Type
(
v1
),
UnpackedKind
::
Type
(
v2
))
=>
{
...
...
src/librustc/ty/mod.rs
浏览文件 @
3dd303aa
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
use
hir
;
use
hir
;
pub
use
self
::
sty
::{
Binder
,
BoundTy
,
BoundTyKind
,
Bound
TyIndex
,
DebruijnIndex
,
INNERMOST
};
pub
use
self
::
sty
::{
Binder
,
BoundTy
,
BoundTyKind
,
Bound
Var
,
DebruijnIndex
,
INNERMOST
};
pub
use
self
::
sty
::{
FnSig
,
GenSig
,
CanonicalPolyFnSig
,
PolyFnSig
,
PolyGenSig
};
pub
use
self
::
sty
::{
FnSig
,
GenSig
,
CanonicalPolyFnSig
,
PolyFnSig
,
PolyGenSig
};
pub
use
self
::
sty
::{
InferTy
,
ParamTy
,
ProjectionTy
,
ExistentialPredicate
};
pub
use
self
::
sty
::{
InferTy
,
ParamTy
,
ProjectionTy
,
ExistentialPredicate
};
pub
use
self
::
sty
::{
ClosureSubsts
,
GeneratorSubsts
,
UpvarSubsts
,
TypeAndMut
};
pub
use
self
::
sty
::{
ClosureSubsts
,
GeneratorSubsts
,
UpvarSubsts
,
TypeAndMut
};
...
...
src/librustc/ty/sty.rs
浏览文件 @
3dd303aa
...
@@ -1171,7 +1171,7 @@ pub enum RegionKind {
...
@@ -1171,7 +1171,7 @@ pub enum RegionKind {
ReClosureBound
(
RegionVid
),
ReClosureBound
(
RegionVid
),
/// Canonicalized region, used only when preparing a trait query.
/// Canonicalized region, used only when preparing a trait query.
ReCanonical
(
Bound
TyIndex
),
ReCanonical
(
Bound
Var
),
}
}
impl
<
'tcx
>
serialize
::
UseSpecializedDecodable
for
Region
<
'tcx
>
{}
impl
<
'tcx
>
serialize
::
UseSpecializedDecodable
for
Region
<
'tcx
>
{}
...
@@ -1225,13 +1225,13 @@ pub enum InferTy {
...
@@ -1225,13 +1225,13 @@ pub enum InferTy {
}
}
newtype_index!
{
newtype_index!
{
pub
struct
Bound
TyIndex
{
..
}
pub
struct
Bound
Var
{
..
}
}
}
#[derive(Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Debug,
RustcEncodable,
RustcDecodable)]
#[derive(Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Debug,
RustcEncodable,
RustcDecodable)]
pub
struct
BoundTy
{
pub
struct
BoundTy
{
pub
level
:
DebruijnIndex
,
pub
level
:
DebruijnIndex
,
pub
var
:
Bound
TyIndex
,
pub
var
:
Bound
Var
,
pub
kind
:
BoundTyKind
,
pub
kind
:
BoundTyKind
,
}
}
...
@@ -1245,7 +1245,7 @@ pub enum BoundTyKind {
...
@@ -1245,7 +1245,7 @@ pub enum BoundTyKind {
impl_stable_hash_for!
(
enum
self
::
BoundTyKind
{
Anon
,
Param
(
a
)
});
impl_stable_hash_for!
(
enum
self
::
BoundTyKind
{
Anon
,
Param
(
a
)
});
impl
BoundTy
{
impl
BoundTy
{
pub
fn
new
(
level
:
DebruijnIndex
,
var
:
Bound
TyIndex
)
->
Self
{
pub
fn
new
(
level
:
DebruijnIndex
,
var
:
Bound
Var
)
->
Self
{
BoundTy
{
BoundTy
{
level
,
level
,
var
,
var
,
...
...
src/librustc/ty/subst.rs
浏览文件 @
3dd303aa
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
use
hir
::
def_id
::
DefId
;
use
hir
::
def_id
::
DefId
;
use
infer
::
canonical
::
Canonical
;
use
infer
::
canonical
::
Canonical
;
use
ty
::{
self
,
Bound
TyIndex
,
Lift
,
List
,
Ty
,
TyCtxt
};
use
ty
::{
self
,
Bound
Var
,
Lift
,
List
,
Ty
,
TyCtxt
};
use
ty
::
fold
::{
TypeFoldable
,
TypeFolder
,
TypeVisitor
};
use
ty
::
fold
::{
TypeFoldable
,
TypeFolder
,
TypeVisitor
};
use
serialize
::{
self
,
Encodable
,
Encoder
,
Decodable
,
Decoder
};
use
serialize
::{
self
,
Encodable
,
Encoder
,
Decodable
,
Decoder
};
...
@@ -553,7 +553,7 @@ pub fn is_identity(&self) -> bool {
...
@@ -553,7 +553,7 @@ pub fn is_identity(&self) -> bool {
return
false
;
return
false
;
}
}
self
.value.substs
.iter
()
.zip
(
Bound
TyIndex
::
new
(
0
)
..
)
.all
(|(
kind
,
cvar
)|
{
self
.value.substs
.iter
()
.zip
(
Bound
Var
::
new
(
0
)
..
)
.all
(|(
kind
,
cvar
)|
{
match
kind
.unpack
()
{
match
kind
.unpack
()
{
UnpackedKind
::
Type
(
ty
)
=>
match
ty
.sty
{
UnpackedKind
::
Type
(
ty
)
=>
match
ty
.sty
{
ty
::
Bound
(
ref
b
)
=>
cvar
==
b
.var
,
ty
::
Bound
(
ref
b
)
=>
cvar
==
b
.var
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录