Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
15101c8e
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
15101c8e
编写于
9月 07, 2021
作者:
E
Ellen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove debug stmts
上级
1f57f8b9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
1 addition
and
8 deletion
+1
-8
compiler/rustc_mir_build/src/build/mod.rs
compiler/rustc_mir_build/src/build/mod.rs
+0
-2
compiler/rustc_mir_build/src/thir/cx/expr.rs
compiler/rustc_mir_build/src/thir/cx/expr.rs
+0
-3
compiler/rustc_mir_build/src/thir/cx/mod.rs
compiler/rustc_mir_build/src/thir/cx/mod.rs
+0
-1
compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
...ler/rustc_trait_selection/src/traits/const_evaluatable.rs
+1
-2
未找到文件。
compiler/rustc_mir_build/src/build/mod.rs
浏览文件 @
15101c8e
...
...
@@ -28,7 +28,6 @@
if
let
Some
(
def
)
=
def
.try_upgrade
(
tcx
)
{
return
tcx
.mir_built
(
def
);
}
debug!
(
"mir_built: def={:?}"
,
def
);
let
mut
body
=
mir_build
(
tcx
,
def
);
if
def
.const_param_did
.is_some
()
{
...
...
@@ -41,7 +40,6 @@
/// Construct the MIR for a given `DefId`.
fn
mir_build
(
tcx
:
TyCtxt
<
'_
>
,
def
:
ty
::
WithOptConstParam
<
LocalDefId
>
)
->
Body
<
'_
>
{
debug!
(
"mir_build: def={:?}"
,
def
);
let
id
=
tcx
.hir
()
.local_def_id_to_hir_id
(
def
.did
);
let
body_owner_kind
=
tcx
.hir
()
.body_owner_kind
(
id
);
let
typeck_results
=
tcx
.typeck_opt_const_arg
(
def
);
...
...
compiler/rustc_mir_build/src/thir/cx/expr.rs
浏览文件 @
15101c8e
...
...
@@ -149,9 +149,7 @@ fn apply_adjustment(
}
fn
make_mirror_unadjusted
(
&
mut
self
,
expr
:
&
'tcx
hir
::
Expr
<
'tcx
>
)
->
Expr
<
'tcx
>
{
debug!
(
"Expr::make_mirror_unadjusted: expr={:?}"
,
expr
);
let
expr_ty
=
self
.typeck_results
()
.expr_ty
(
expr
);
debug!
(
"Expr::make_mirror_unadjusted: expr_ty={:?}"
,
expr_ty
);
let
temp_lifetime
=
self
.region_scope_tree
.temporary_scope
(
expr
.hir_id.local_id
);
let
kind
=
match
expr
.kind
{
...
...
@@ -764,7 +762,6 @@ fn make_mirror_unadjusted(&mut self, expr: &'tcx hir::Expr<'tcx>) -> Expr<'tcx>
hir
::
ExprKind
::
Err
=>
unreachable!
(),
};
debug!
(
"Expr::make_mirror_unadjusted: finish"
);
Expr
{
temp_lifetime
,
ty
:
expr_ty
,
span
:
expr
.span
,
kind
}
}
...
...
compiler/rustc_mir_build/src/thir/cx/mod.rs
浏览文件 @
15101c8e
...
...
@@ -20,7 +20,6 @@
tcx
:
TyCtxt
<
'tcx
>
,
owner_def
:
ty
::
WithOptConstParam
<
LocalDefId
>
,
)
->
(
&
'tcx
Steal
<
Thir
<
'tcx
>>
,
ExprId
)
{
debug!
(
"thir_body: {:?}"
,
owner_def
);
let
hir
=
tcx
.hir
();
let
body
=
hir
.body
(
hir
.body_owned_by
(
hir
.local_def_id_to_hir_id
(
owner_def
.did
)));
let
mut
cx
=
Cx
::
new
(
tcx
,
owner_def
);
...
...
compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
浏览文件 @
15101c8e
...
...
@@ -435,9 +435,8 @@ pub(super) fn mir_abstract_const<'tcx>(
DefKind
::
AnonConst
=>
(),
_
=>
return
Ok
(
None
),
}
debug!
(
"mir_abstract_const: {:?}"
,
def
);
let
body
=
tcx
.thir_body
(
def
);
if
body
.0
.borrow
()
.exprs
.is_empty
()
{
// type error in constant, there is no thir
return
Err
(
ErrorReported
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录