Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
165e460c
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,发现更多精彩内容 >>
提交
165e460c
编写于
7月 07, 2019
作者:
M
Matthew Jasper
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove `HAS_NORMALIZABLE_PROJECTION`
上级
6b152f83
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
17 deletion
+8
-17
src/librustc/ty/flags.rs
src/librustc/ty/flags.rs
+2
-7
src/librustc/ty/mod.rs
src/librustc/ty/mod.rs
+6
-10
未找到文件。
src/librustc/ty/flags.rs
浏览文件 @
165e460c
use
crate
::
ty
::
subst
::{
SubstsRef
,
UnpackedKind
};
use
crate
::
ty
::{
self
,
Ty
,
TypeFlags
,
TypeFoldable
,
InferConst
};
use
crate
::
ty
::{
self
,
Ty
,
TypeFlags
,
InferConst
};
use
crate
::
mir
::
interpret
::
ConstValue
;
#[derive(Debug)]
...
...
@@ -139,11 +139,6 @@ fn add_sty(&mut self, st: &ty::TyKind<'_>) {
}
&
ty
::
Projection
(
ref
data
)
=>
{
// currently we can't normalize projections that
// include bound regions, so track those separately.
if
!
data
.has_escaping_bound_vars
()
{
self
.add_flags
(
TypeFlags
::
HAS_NORMALIZABLE_PROJECTION
);
}
self
.add_flags
(
TypeFlags
::
HAS_PROJECTION
);
self
.add_projection_ty
(
data
);
}
...
...
@@ -239,7 +234,7 @@ fn add_const(&mut self, c: &ty::Const<'_>) {
match
c
.val
{
ConstValue
::
Unevaluated
(
_
,
substs
)
=>
{
self
.add_substs
(
substs
);
self
.add_flags
(
TypeFlags
::
HAS_
NORMALIZABLE_PROJECTION
|
TypeFlags
::
HAS_
PROJECTION
);
self
.add_flags
(
TypeFlags
::
HAS_PROJECTION
);
},
ConstValue
::
Infer
(
infer
)
=>
{
self
.add_flags
(
TypeFlags
::
HAS_FREE_LOCAL_NAMES
|
TypeFlags
::
HAS_CT_INFER
);
...
...
src/librustc/ty/mod.rs
浏览文件 @
165e460c
...
...
@@ -441,20 +441,16 @@ pub struct TypeFlags: u32 {
/// Present if the type belongs in a local type context.
/// Only set for Infer other than Fresh.
const
KEEP_IN_LOCAL_TCX
=
1
<<
11
;
// Is there a projection that does not involve a bound region?
// Currently we can't normalize projections w/ bound regions.
const
HAS_NORMALIZABLE_PROJECTION
=
1
<<
12
;
const
KEEP_IN_LOCAL_TCX
=
1
<<
10
;
/// Does this have any `ReLateBound` regions? Used to check
/// if a global bound is safe to evaluate.
const
HAS_RE_LATE_BOUND
=
1
<<
1
3
;
const
HAS_RE_LATE_BOUND
=
1
<<
1
1
;
const
HAS_TY_PLACEHOLDER
=
1
<<
1
4
;
const
HAS_TY_PLACEHOLDER
=
1
<<
1
2
;
const
HAS_CT_INFER
=
1
<<
1
5
;
const
HAS_CT_PLACEHOLDER
=
1
<<
1
6
;
const
HAS_CT_INFER
=
1
<<
1
3
;
const
HAS_CT_PLACEHOLDER
=
1
<<
1
4
;
const
NEEDS_SUBST
=
TypeFlags
::
HAS_PARAMS
.bits
|
TypeFlags
::
HAS_RE_EARLY_BOUND
.bits
;
...
...
@@ -465,7 +461,6 @@ pub struct TypeFlags: u32 {
const
NOMINAL_FLAGS
=
TypeFlags
::
HAS_PARAMS
.bits
|
TypeFlags
::
HAS_TY_INFER
.bits
|
TypeFlags
::
HAS_RE_INFER
.bits
|
TypeFlags
::
HAS_CT_INFER
.bits
|
TypeFlags
::
HAS_RE_PLACEHOLDER
.bits
|
TypeFlags
::
HAS_RE_EARLY_BOUND
.bits
|
TypeFlags
::
HAS_FREE_REGIONS
.bits
|
...
...
@@ -476,6 +471,7 @@ pub struct TypeFlags: u32 {
TypeFlags
::
KEEP_IN_LOCAL_TCX
.bits
|
TypeFlags
::
HAS_RE_LATE_BOUND
.bits
|
TypeFlags
::
HAS_TY_PLACEHOLDER
.bits
|
TypeFlags
::
HAS_CT_INFER
.bits
|
TypeFlags
::
HAS_CT_PLACEHOLDER
.bits
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录