Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
d21bfff7
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
d21bfff7
编写于
9月 10, 2015
作者:
N
Nick Cameron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove hir::ExprParen
上级
70c6fb91
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
18 addition
and
103 deletion
+18
-103
src/librustc/middle/cfg/construct.rs
src/librustc/middle/cfg/construct.rs
+0
-1
src/librustc/middle/check_const.rs
src/librustc/middle/check_const.rs
+0
-2
src/librustc/middle/const_eval.rs
src/librustc/middle/const_eval.rs
+0
-1
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/expr_use_visitor.rs
+0
-7
src/librustc/middle/liveness.rs
src/librustc/middle/liveness.rs
+3
-4
src/librustc/middle/mem_categorization.rs
src/librustc/middle/mem_categorization.rs
+0
-4
src/librustc/middle/region.rs
src/librustc/middle/region.rs
+2
-4
src/librustc_back/svh.rs
src/librustc_back/svh.rs
+0
-2
src/librustc_front/fold.rs
src/librustc_front/fold.rs
+0
-1
src/librustc_front/hir.rs
src/librustc_front/hir.rs
+0
-3
src/librustc_front/lowering.rs
src/librustc_front/lowering.rs
+3
-1
src/librustc_front/print/pprust.rs
src/librustc_front/print/pprust.rs
+0
-5
src/librustc_front/visit.rs
src/librustc_front/visit.rs
+0
-3
src/librustc_lint/builtin.rs
src/librustc_lint/builtin.rs
+0
-3
src/librustc_mir/build/expr/as_constant.rs
src/librustc_mir/build/expr/as_constant.rs
+0
-3
src/librustc_mir/build/expr/as_lvalue.rs
src/librustc_mir/build/expr/as_lvalue.rs
+0
-3
src/librustc_mir/build/expr/as_operand.rs
src/librustc_mir/build/expr/as_operand.rs
+4
-10
src/librustc_mir/build/expr/as_rvalue.rs
src/librustc_mir/build/expr/as_rvalue.rs
+0
-3
src/librustc_mir/build/expr/as_temp.rs
src/librustc_mir/build/expr/as_temp.rs
+4
-10
src/librustc_mir/build/expr/category.rs
src/librustc_mir/build/expr/category.rs
+1
-3
src/librustc_mir/build/expr/into.rs
src/librustc_mir/build/expr/into.rs
+0
-3
src/librustc_mir/hair.rs
src/librustc_mir/hair.rs
+0
-1
src/librustc_mir/tcx/expr.rs
src/librustc_mir/tcx/expr.rs
+0
-2
src/librustc_trans/trans/consts.rs
src/librustc_trans/trans/consts.rs
+0
-3
src/librustc_trans/trans/debuginfo/create_scope_map.rs
src/librustc_trans/trans/debuginfo/create_scope_map.rs
+1
-2
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/expr.rs
+0
-11
src/librustc_typeck/check/method/confirm.rs
src/librustc_typeck/check/method/confirm.rs
+0
-1
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/mod.rs
+0
-7
未找到文件。
src/librustc/middle/cfg/construct.rs
浏览文件 @
d21bfff7
...
...
@@ -354,7 +354,6 @@ fn expr(&mut self, expr: &hir::Expr, pred: CFGIndex) -> CFGIndex {
hir
::
ExprAddrOf
(
_
,
ref
e
)
|
hir
::
ExprCast
(
ref
e
,
_
)
|
hir
::
ExprUnary
(
_
,
ref
e
)
|
hir
::
ExprParen
(
ref
e
)
|
hir
::
ExprField
(
ref
e
,
_
)
|
hir
::
ExprTupField
(
ref
e
,
_
)
=>
{
self
.straightline
(
expr
,
pred
,
Some
(
&**
e
)
.into_iter
())
...
...
src/librustc/middle/check_const.rs
浏览文件 @
d21bfff7
...
...
@@ -678,7 +678,6 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
let
mut
callee
=
&**
callee
;
loop
{
callee
=
match
callee
.node
{
hir
::
ExprParen
(
ref
inner
)
=>
&**
inner
,
hir
::
ExprBlock
(
ref
block
)
=>
match
block
.expr
{
Some
(
ref
tail
)
=>
&**
tail
,
None
=>
break
...
...
@@ -763,7 +762,6 @@ fn check_expr<'a, 'tcx>(v: &mut CheckCrateVisitor<'a, 'tcx>,
hir
::
ExprField
(
..
)
|
hir
::
ExprTupField
(
..
)
|
hir
::
ExprVec
(
_
)
|
hir
::
ExprParen
(
..
)
|
hir
::
ExprTup
(
..
)
=>
{}
// Conditional control flow (possible to implement).
...
...
src/librustc/middle/const_eval.rs
浏览文件 @
d21bfff7
...
...
@@ -996,7 +996,6 @@ fn fromb(b: bool) -> ConstVal { Int(b as i64) }
hir
::
ExprLit
(
ref
lit
)
=>
{
lit_to_const
(
&**
lit
,
ety
)
}
hir
::
ExprParen
(
ref
e
)
=>
try!
(
eval_const_expr_partial
(
tcx
,
&**
e
,
ty_hint
)),
hir
::
ExprBlock
(
ref
block
)
=>
{
match
block
.expr
{
Some
(
ref
expr
)
=>
try!
(
eval_const_expr_partial
(
tcx
,
&**
expr
,
ty_hint
)),
...
...
src/librustc/middle/expr_use_visitor.rs
浏览文件 @
d21bfff7
...
...
@@ -362,9 +362,6 @@ fn borrow_expr(&mut self,
let
cmt
=
return_if_err!
(
self
.mc
.cat_expr
(
expr
));
self
.delegate
.borrow
(
expr
.id
,
expr
.span
,
cmt
,
r
,
bk
,
cause
);
// Note: Unlike consume, we can ignore ExprParen. cat_expr
// already skips over them, and walk will uncover any
// attachments or whatever.
self
.walk_expr
(
expr
)
}
...
...
@@ -378,10 +375,6 @@ pub fn walk_expr(&mut self, expr: &hir::Expr) {
self
.walk_adjustment
(
expr
);
match
expr
.node
{
hir
::
ExprParen
(
ref
subexpr
)
=>
{
self
.walk_expr
(
&**
subexpr
)
}
hir
::
ExprPath
(
..
)
=>
{
}
hir
::
ExprUnary
(
hir
::
UnDeref
,
ref
base
)
=>
{
// *base
...
...
src/librustc/middle/liveness.rs
浏览文件 @
d21bfff7
...
...
@@ -495,7 +495,7 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) {
hir
::
ExprAgain
(
_
)
|
hir
::
ExprLit
(
_
)
|
hir
::
ExprRet
(
..
)
|
hir
::
ExprBlock
(
..
)
|
hir
::
ExprAssign
(
..
)
|
hir
::
ExprAssignOp
(
..
)
|
hir
::
ExprStruct
(
..
)
|
hir
::
ExprRepeat
(
..
)
|
hir
::
Expr
Paren
(
..
)
|
hir
::
Expr
InlineAsm
(
..
)
|
hir
::
ExprBox
(
..
)
|
hir
::
ExprInlineAsm
(
..
)
|
hir
::
ExprBox
(
..
)
|
hir
::
ExprRange
(
..
)
=>
{
visit
::
walk_expr
(
ir
,
expr
);
}
...
...
@@ -1161,8 +1161,7 @@ fn propagate_through_expr(&mut self, expr: &Expr, succ: LiveNode)
hir
::
ExprBox
(
None
,
ref
e
)
|
hir
::
ExprAddrOf
(
_
,
ref
e
)
|
hir
::
ExprCast
(
ref
e
,
_
)
|
hir
::
ExprUnary
(
_
,
ref
e
)
|
hir
::
ExprParen
(
ref
e
)
=>
{
hir
::
ExprUnary
(
_
,
ref
e
)
=>
{
self
.propagate_through_expr
(
&**
e
,
succ
)
}
...
...
@@ -1435,7 +1434,7 @@ fn check_expr(this: &mut Liveness, expr: &Expr) {
hir
::
ExprCast
(
..
)
|
hir
::
ExprUnary
(
..
)
|
hir
::
ExprRet
(
..
)
|
hir
::
ExprBreak
(
..
)
|
hir
::
ExprAgain
(
..
)
|
hir
::
ExprLit
(
_
)
|
hir
::
ExprBlock
(
..
)
|
hir
::
ExprAddrOf
(
..
)
|
hir
::
ExprStruct
(
..
)
|
hir
::
ExprRepeat
(
..
)
|
hir
::
ExprParen
(
..
)
|
hir
::
ExprStruct
(
..
)
|
hir
::
ExprRepeat
(
..
)
|
hir
::
ExprClosure
(
..
)
|
hir
::
ExprPath
(
..
)
|
hir
::
ExprBox
(
..
)
|
hir
::
ExprRange
(
..
)
=>
{
visit
::
walk_expr
(
this
,
expr
);
...
...
src/librustc/middle/mem_categorization.rs
浏览文件 @
d21bfff7
...
...
@@ -519,10 +519,6 @@ pub fn cat_expr_unadjusted(&self, expr: &hir::Expr) -> McResult<cmt<'tcx>> {
self
.cat_def
(
expr
.id
,
expr
.span
,
expr_ty
,
def
)
}
hir
::
ExprParen
(
ref
e
)
=>
{
self
.cat_expr
(
&**
e
)
}
hir
::
ExprAddrOf
(
..
)
|
hir
::
ExprCall
(
..
)
|
hir
::
ExprAssign
(
..
)
|
hir
::
ExprAssignOp
(
..
)
|
hir
::
ExprClosure
(
..
)
|
hir
::
ExprRet
(
..
)
|
...
...
src/librustc/middle/region.rs
浏览文件 @
d21bfff7
...
...
@@ -997,8 +997,7 @@ fn record_rvalue_scope_if_borrow_expr(visitor: &mut RegionResolutionVisitor,
hir
::
ExprUnary
(
hir
::
UnUniq
,
ref
subexpr
)
=>
{
record_rvalue_scope_if_borrow_expr
(
visitor
,
&**
subexpr
,
blk_id
);
}
hir
::
ExprCast
(
ref
subexpr
,
_
)
|
hir
::
ExprParen
(
ref
subexpr
)
=>
{
hir
::
ExprCast
(
ref
subexpr
,
_
)
=>
{
record_rvalue_scope_if_borrow_expr
(
visitor
,
&**
subexpr
,
blk_id
)
}
hir
::
ExprBlock
(
ref
block
)
=>
{
...
...
@@ -1047,8 +1046,7 @@ fn record_rvalue_scope<'a>(visitor: &mut RegionResolutionVisitor,
hir
::
ExprUnary
(
hir
::
UnDeref
,
ref
subexpr
)
|
hir
::
ExprField
(
ref
subexpr
,
_
)
|
hir
::
ExprTupField
(
ref
subexpr
,
_
)
|
hir
::
ExprIndex
(
ref
subexpr
,
_
)
|
hir
::
ExprParen
(
ref
subexpr
)
=>
{
hir
::
ExprIndex
(
ref
subexpr
,
_
)
=>
{
expr
=
&**
subexpr
;
}
_
=>
{
...
...
src/librustc_back/svh.rs
浏览文件 @
d21bfff7
...
...
@@ -249,7 +249,6 @@ pub enum SawExprComponent<'a> {
SawExprInlineAsm
(
&
'a
hir
::
InlineAsm
),
SawExprStruct
,
SawExprRepeat
,
SawExprParen
,
}
fn
saw_expr
<
'a
>
(
node
:
&
'a
Expr_
)
->
SawExprComponent
<
'a
>
{
...
...
@@ -283,7 +282,6 @@ fn saw_expr<'a>(node: &'a Expr_) -> SawExprComponent<'a> {
ExprInlineAsm
(
ref
asm
)
=>
SawExprInlineAsm
(
asm
),
ExprStruct
(
..
)
=>
SawExprStruct
,
ExprRepeat
(
..
)
=>
SawExprRepeat
,
ExprParen
(
..
)
=>
SawExprParen
,
}
}
...
...
src/librustc_front/fold.rs
浏览文件 @
d21bfff7
...
...
@@ -1164,7 +1164,6 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span}: Expr, folder: &mut T) ->
fields
.move_map
(|
x
|
folder
.fold_field
(
x
)),
maybe_expr
.map
(|
x
|
folder
.fold_expr
(
x
)))
},
ExprParen
(
ex
)
=>
ExprParen
(
folder
.fold_expr
(
ex
))
},
span
:
folder
.new_span
(
span
)
}
...
...
src/librustc_front/hir.rs
浏览文件 @
d21bfff7
...
...
@@ -703,9 +703,6 @@ pub enum Expr_ {
/// For example, `[1u8; 5]`. The first expression is the element
/// to be repeated; the second is the number of times to repeat it.
ExprRepeat
(
P
<
Expr
>
,
P
<
Expr
>
),
/// No-op: used solely so we can pretty-print faithfully
ExprParen
(
P
<
Expr
>
)
}
/// The explicit Self type in a "qualified path". The actual
...
...
src/librustc_front/lowering.rs
浏览文件 @
d21bfff7
...
...
@@ -810,7 +810,9 @@ pub fn lower_expr(e: &Expr) -> P<hir::Expr> {
fields
.iter
()
.map
(|
x
|
lower_field
(
x
))
.collect
(),
maybe_expr
.as_ref
()
.map
(|
x
|
lower_expr
(
x
)))
},
ExprParen
(
ref
ex
)
=>
hir
::
ExprParen
(
lower_expr
(
ex
)),
ExprParen
(
ref
ex
)
=>
{
return
lower_expr
(
ex
);
}
ExprIfLet
(
..
)
|
ExprWhileLet
(
..
)
|
ExprForLoop
(
..
)
|
...
...
src/librustc_front/print/pprust.rs
浏览文件 @
d21bfff7
...
...
@@ -1556,11 +1556,6 @@ pub fn print_expr(&mut self, expr: &hir::Expr) -> io::Result<()> {
try!
(
self
.pclose
());
}
hir
::
ExprParen
(
ref
e
)
=>
{
try!
(
self
.popen
());
try!
(
self
.print_expr
(
&**
e
));
try!
(
self
.pclose
());
}
}
try!
(
self
.ann
.post
(
self
,
NodeExpr
(
expr
)));
self
.end
()
...
...
src/librustc_front/visit.rs
浏览文件 @
d21bfff7
...
...
@@ -814,9 +814,6 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
ExprRet
(
ref
optional_expression
)
=>
{
walk_expr_opt
(
visitor
,
optional_expression
)
}
ExprParen
(
ref
subexpression
)
=>
{
visitor
.visit_expr
(
&**
subexpression
)
}
ExprInlineAsm
(
ref
ia
)
=>
{
for
input
in
&
ia
.inputs
{
let
(
_
,
ref
input
)
=
*
input
;
...
...
src/librustc_lint/builtin.rs
浏览文件 @
d21bfff7
...
...
@@ -154,9 +154,6 @@ fn check_expr(&mut self, cx: &LateContext, e: &hir::Expr) {
self
.negated_expr_id
=
expr
.id
;
}
},
hir
::
ExprParen
(
ref
expr
)
if
self
.negated_expr_id
==
e
.id
=>
{
self
.negated_expr_id
=
expr
.id
;
},
hir
::
ExprBinary
(
binop
,
ref
l
,
ref
r
)
=>
{
if
is_comparison
(
binop
)
&&
!
check_limits
(
cx
.tcx
,
binop
,
&**
l
,
&**
r
)
{
cx
.span_lint
(
UNUSED_COMPARISONS
,
e
.span
,
...
...
src/librustc_mir/build/expr/as_constant.rs
浏览文件 @
d21bfff7
...
...
@@ -33,9 +33,6 @@ fn expr_as_constant(&mut self, expr: Expr<H>) -> Constant<H> {
ExprKind
::
Scope
{
extent
:
_
,
value
}
=>
{
return
this
.as_constant
(
value
);
}
ExprKind
::
Paren
{
arg
}
=>
{
return
this
.as_constant
(
arg
);
}
ExprKind
::
Literal
{
literal
}
=>
{
ConstantKind
::
Literal
(
literal
)
}
...
...
src/librustc_mir/build/expr/as_lvalue.rs
浏览文件 @
d21bfff7
...
...
@@ -43,9 +43,6 @@ fn expr_as_lvalue(&mut self,
this
.as_lvalue
(
block
,
value
)
})
}
ExprKind
::
Paren
{
arg
}
=>
{
this
.as_lvalue
(
block
,
arg
)
}
ExprKind
::
Field
{
lhs
,
name
}
=>
{
let
lvalue
=
unpack!
(
block
=
this
.as_lvalue
(
block
,
lhs
));
let
lvalue
=
lvalue
.field
(
name
);
...
...
src/librustc_mir/build/expr/as_operand.rs
浏览文件 @
d21bfff7
...
...
@@ -39,16 +39,10 @@ fn expr_as_operand(&mut self,
block
,
expr
);
let
this
=
self
;
match
expr
.kind
{
ExprKind
::
Scope
{
extent
,
value
}
=>
{
return
this
.in_scope
(
extent
,
block
,
|
this
|
{
this
.as_operand
(
block
,
value
)
});
}
ExprKind
::
Paren
{
arg
}
=>
{
return
this
.as_operand
(
block
,
arg
);
}
_
=>
{
}
if
let
ExprKind
::
Scope
{
extent
,
value
}
=
expr
.kind
{
return
this
.in_scope
(
extent
,
block
,
|
this
|
{
this
.as_operand
(
block
,
value
)
});
}
let
category
=
Category
::
of
(
&
expr
.kind
)
.unwrap
();
...
...
src/librustc_mir/build/expr/as_rvalue.rs
浏览文件 @
d21bfff7
...
...
@@ -46,9 +46,6 @@ fn expr_as_rvalue(&mut self,
this
.as_rvalue
(
block
,
value
)
})
}
ExprKind
::
Paren
{
arg
}
=>
{
this
.as_rvalue
(
block
,
arg
)
}
ExprKind
::
InlineAsm
{
asm
}
=>
{
block
.and
(
Rvalue
::
InlineAsm
(
asm
))
}
...
...
src/librustc_mir/build/expr/as_temp.rs
浏览文件 @
d21bfff7
...
...
@@ -37,16 +37,10 @@ fn expr_as_temp(&mut self,
block
,
expr
);
let
this
=
self
;
match
expr
.kind
{
ExprKind
::
Scope
{
extent
,
value
}
=>
{
return
this
.in_scope
(
extent
,
block
,
|
this
|
{
this
.as_temp
(
block
,
value
)
});
}
ExprKind
::
Paren
{
arg
}
=>
{
return
this
.as_temp
(
block
,
arg
);
}
_
=>
{
}
if
let
ExprKind
::
Scope
{
extent
,
value
}
=
expr
.kind
{
return
this
.in_scope
(
extent
,
block
,
|
this
|
{
this
.as_temp
(
block
,
value
)
});
}
let
expr_ty
=
expr
.ty
.clone
();
...
...
src/librustc_mir/build/expr/category.rs
浏览文件 @
d21bfff7
...
...
@@ -43,9 +43,7 @@ pub enum RvalueFunc {
impl
Category
{
pub
fn
of
<
H
:
Hair
>
(
ek
:
&
ExprKind
<
H
>
)
->
Option
<
Category
>
{
match
*
ek
{
ExprKind
::
Scope
{
..
}
|
ExprKind
::
Paren
{
..
}
=>
None
,
ExprKind
::
Scope
{
..
}
=>
None
,
ExprKind
::
Field
{
..
}
|
ExprKind
::
Deref
{
..
}
|
...
...
src/librustc_mir/build/expr/into.rs
浏览文件 @
d21bfff7
...
...
@@ -40,9 +40,6 @@ pub fn into_expr(&mut self,
this
.into
(
destination
,
block
,
value
)
})
}
ExprKind
::
Paren
{
arg
}
=>
{
this
.into
(
destination
,
block
,
arg
)
}
ExprKind
::
Block
{
body
:
ast_block
}
=>
{
this
.ast_block
(
destination
,
block
,
ast_block
)
}
...
...
src/librustc_mir/hair.rs
浏览文件 @
d21bfff7
...
...
@@ -171,7 +171,6 @@ pub struct Expr<H:Hair> {
#[derive(Clone,
Debug)]
pub
enum
ExprKind
<
H
:
Hair
>
{
Scope
{
extent
:
H
::
CodeExtent
,
value
:
ExprRef
<
H
>
},
Paren
{
arg
:
ExprRef
<
H
>
},
// ugh. should be able to remove this!
Box
{
place
:
Option
<
ExprRef
<
H
>>
,
value
:
ExprRef
<
H
>
},
Call
{
fun
:
ExprRef
<
H
>
,
args
:
Vec
<
ExprRef
<
H
>>
},
Deref
{
arg
:
ExprRef
<
H
>
},
// NOT overloaded!
...
...
src/librustc_mir/tcx/expr.rs
浏览文件 @
d21bfff7
...
...
@@ -267,8 +267,6 @@ fn make_mirror(self, cx: &mut Cx<'a,'tcx>) -> Expr<Cx<'a,'tcx>> {
// Now comes the rote stuff:
hir
::
ExprParen
(
ref
p
)
=>
ExprKind
::
Paren
{
arg
:
p
.to_ref
()
},
hir
::
ExprRepeat
(
ref
v
,
ref
c
)
=>
ExprKind
::
Repeat
{
value
:
v
.to_ref
(),
count
:
c
.to_ref
()
},
hir
::
ExprRet
(
ref
v
)
=>
...
...
src/librustc_trans/trans/consts.rs
浏览文件 @
d21bfff7
...
...
@@ -703,7 +703,6 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
let
mut
cur
=
sub
;
loop
{
match
cur
.node
{
hir
::
ExprParen
(
ref
sub
)
=>
cur
=
sub
,
hir
::
ExprBlock
(
ref
blk
)
=>
{
if
let
Some
(
ref
sub
)
=
blk
.expr
{
cur
=
sub
;
...
...
@@ -830,7 +829,6 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
let
mut
callee
=
&**
callee
;
loop
{
callee
=
match
callee
.node
{
hir
::
ExprParen
(
ref
inner
)
=>
&**
inner
,
hir
::
ExprBlock
(
ref
block
)
=>
match
block
.expr
{
Some
(
ref
tail
)
=>
&**
tail
,
None
=>
break
,
...
...
@@ -870,7 +868,6 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
const_fn_call
(
cx
,
MethodCallKey
(
method_call
),
method_did
,
&
arg_vals
,
param_substs
)
},
hir
::
ExprParen
(
ref
e
)
=>
const_expr
(
cx
,
&**
e
,
param_substs
,
fn_args
)
.0
,
hir
::
ExprBlock
(
ref
block
)
=>
{
match
block
.expr
{
Some
(
ref
expr
)
=>
const_expr
(
cx
,
&**
expr
,
param_substs
,
fn_args
)
.0
,
...
...
src/librustc_trans/trans/debuginfo/create_scope_map.rs
浏览文件 @
d21bfff7
...
...
@@ -322,8 +322,7 @@ fn walk_expr(cx: &CrateContext,
hir
::
ExprCast
(
ref
sub_exp
,
_
)
|
hir
::
ExprAddrOf
(
_
,
ref
sub_exp
)
|
hir
::
ExprField
(
ref
sub_exp
,
_
)
|
hir
::
ExprTupField
(
ref
sub_exp
,
_
)
|
hir
::
ExprParen
(
ref
sub_exp
)
=>
hir
::
ExprTupField
(
ref
sub_exp
,
_
)
=>
walk_expr
(
cx
,
&**
sub_exp
,
scope_stack
,
scope_map
),
hir
::
ExprBox
(
ref
place
,
ref
sub_expr
)
=>
{
...
...
src/librustc_trans/trans/expr.rs
浏览文件 @
d21bfff7
...
...
@@ -630,9 +630,6 @@ fn trans_datum_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
let
_
icx
=
push_ctxt
(
"trans_datum_unadjusted"
);
match
expr
.node
{
hir
::
ExprParen
(
ref
e
)
=>
{
trans
(
bcx
,
&**
e
)
}
hir
::
ExprPath
(
..
)
=>
{
trans_def
(
bcx
,
expr
,
bcx
.def
(
expr
.id
))
}
...
...
@@ -934,9 +931,6 @@ fn trans_rvalue_stmt_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
debuginfo
::
set_source_location
(
bcx
.fcx
,
expr
.id
,
expr
.span
);
match
expr
.node
{
hir
::
ExprParen
(
ref
e
)
=>
{
trans_into
(
bcx
,
&**
e
,
Ignore
)
}
hir
::
ExprBreak
(
label_opt
)
=>
{
controlflow
::
trans_break
(
bcx
,
expr
,
label_opt
.map
(|
l
|
l
.node
))
}
...
...
@@ -1050,9 +1044,6 @@ fn trans_rvalue_dps_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
debuginfo
::
set_source_location
(
bcx
.fcx
,
expr
.id
,
expr
.span
);
match
expr
.node
{
hir
::
ExprParen
(
ref
e
)
=>
{
trans_into
(
bcx
,
&**
e
,
dest
)
}
hir
::
ExprPath
(
..
)
=>
{
trans_def_dps_unadjusted
(
bcx
,
expr
,
bcx
.def
(
expr
.id
),
dest
)
}
...
...
@@ -2750,7 +2741,5 @@ fn expr_kind(tcx: &ty::ctxt, expr: &hir::Expr) -> ExprKind {
ExprKind
::
RvalueDps
}
}
hir
::
ExprParen
(
ref
e
)
=>
expr_kind
(
tcx
,
&**
e
),
}
}
src/librustc_typeck/check/method/confirm.rs
浏览文件 @
d21bfff7
...
...
@@ -468,7 +468,6 @@ fn fixup_derefs_on_method_receiver_if_necessary(&self,
loop
{
let
last
=
exprs
[
exprs
.len
()
-
1
];
match
last
.node
{
hir
::
ExprParen
(
ref
expr
)
|
hir
::
ExprField
(
ref
expr
,
_
)
|
hir
::
ExprTupField
(
ref
expr
,
_
)
|
hir
::
ExprIndex
(
ref
expr
,
_
)
|
...
...
src/librustc_typeck/check/mod.rs
浏览文件 @
d21bfff7
...
...
@@ -3444,13 +3444,6 @@ fn check_expr_struct<'a, 'tcx>(fcx: &FnCtxt<'a,'tcx>,
}
fcx
.write_ty
(
id
,
fcx
.infcx
()
.next_diverging_ty_var
());
}
hir
::
ExprParen
(
ref
a
)
=>
{
check_expr_with_expectation_and_lvalue_pref
(
fcx
,
&**
a
,
expected
,
lvalue_pref
);
fcx
.write_ty
(
id
,
fcx
.expr_ty
(
&**
a
));
}
hir
::
ExprAssign
(
ref
lhs
,
ref
rhs
)
=>
{
check_expr_with_lvalue_pref
(
fcx
,
&**
lhs
,
PreferMutLvalue
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录