Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
42cd5d4e
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,发现更多精彩内容 >>
提交
42cd5d4e
编写于
7月 28, 2016
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make it possible to track where hash diverges
上级
e359147d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
0 deletion
+23
-0
src/librustc_incremental/calculate_svh.rs
src/librustc_incremental/calculate_svh.rs
+23
-0
未找到文件。
src/librustc_incremental/calculate_svh.rs
浏览文件 @
42cd5d4e
...
...
@@ -306,12 +306,14 @@ fn visit_nested_item(&mut self, item: ItemId) {
fn
visit_variant_data
(
&
mut
self
,
s
:
&
'a
VariantData
,
name
:
Name
,
g
:
&
'a
Generics
,
_
:
NodeId
,
_
:
Span
)
{
debug!
(
"visit_variant_data: st={:?}"
,
self
.st
);
SawStructDef
(
name
.as_str
())
.hash
(
self
.st
);
visit
::
walk_generics
(
self
,
g
);
visit
::
walk_struct_def
(
self
,
s
)
}
fn
visit_variant
(
&
mut
self
,
v
:
&
'a
Variant
,
g
:
&
'a
Generics
,
item_id
:
NodeId
)
{
debug!
(
"visit_variant: st={:?}"
,
self
.st
);
SawVariant
.hash
(
self
.st
);
// walk_variant does not call walk_generics, so do it here.
visit
::
walk_generics
(
self
,
g
);
...
...
@@ -333,14 +335,17 @@ fn visit_variant(&mut self, v: &'a Variant, g: &'a Generics, item_id: NodeId) {
// pattern, please move that method up above this comment.)
fn
visit_name
(
&
mut
self
,
_
:
Span
,
name
:
Name
)
{
debug!
(
"visit_name: st={:?}"
,
self
.st
);
SawIdent
(
name
.as_str
())
.hash
(
self
.st
);
}
fn
visit_lifetime
(
&
mut
self
,
l
:
&
'a
Lifetime
)
{
debug!
(
"visit_lifetime: st={:?}"
,
self
.st
);
SawLifetime
(
l
.name
.as_str
())
.hash
(
self
.st
);
}
fn
visit_lifetime_def
(
&
mut
self
,
l
:
&
'a
LifetimeDef
)
{
debug!
(
"visit_lifetime_def: st={:?}"
,
self
.st
);
SawLifetimeDef
(
l
.lifetime.name
.as_str
())
.hash
(
self
.st
);
}
...
...
@@ -350,14 +355,18 @@ fn visit_lifetime_def(&mut self, l: &'a LifetimeDef) {
// that a change to a crate body will require downstream
// crates to be recompiled.
fn
visit_expr
(
&
mut
self
,
ex
:
&
'a
Expr
)
{
debug!
(
"visit_expr: st={:?}"
,
self
.st
);
SawExpr
(
saw_expr
(
&
ex
.node
))
.hash
(
self
.st
);
visit
::
walk_expr
(
self
,
ex
)
}
fn
visit_stmt
(
&
mut
self
,
s
:
&
'a
Stmt
)
{
debug!
(
"visit_stmt: st={:?}"
,
self
.st
);
SawStmt
(
saw_stmt
(
&
s
.node
))
.hash
(
self
.st
);
visit
::
walk_stmt
(
self
,
s
)
}
fn
visit_foreign_item
(
&
mut
self
,
i
:
&
'a
ForeignItem
)
{
debug!
(
"visit_foreign_item: st={:?}"
,
self
.st
);
// FIXME (#14132) ideally we would incorporate privacy (or
// perhaps reachability) somewhere here, so foreign items
// that do not leak into downstream crates would not be
...
...
@@ -367,6 +376,7 @@ fn visit_foreign_item(&mut self, i: &'a ForeignItem) {
fn
visit_item
(
&
mut
self
,
i
:
&
'a
Item
)
{
debug!
(
"visit_item: {:?} st={:?}"
,
i
,
self
.st
);
// FIXME (#14132) ideally would incorporate reachability
// analysis somewhere here, so items that never leak into
// downstream crates (e.g. via monomorphisation or
...
...
@@ -375,55 +385,68 @@ fn visit_item(&mut self, i: &'a Item) {
}
fn
visit_mod
(
&
mut
self
,
m
:
&
'a
Mod
,
_
s
:
Span
,
_
n
:
NodeId
)
{
debug!
(
"visit_mod: st={:?}"
,
self
.st
);
SawMod
.hash
(
self
.st
);
visit
::
walk_mod
(
self
,
m
)
}
fn
visit_decl
(
&
mut
self
,
d
:
&
'a
Decl
)
{
debug!
(
"visit_decl: st={:?}"
,
self
.st
);
SawDecl
.hash
(
self
.st
);
visit
::
walk_decl
(
self
,
d
)
}
fn
visit_ty
(
&
mut
self
,
t
:
&
'a
Ty
)
{
debug!
(
"visit_ty: st={:?}"
,
self
.st
);
SawTy
.hash
(
self
.st
);
visit
::
walk_ty
(
self
,
t
)
}
fn
visit_generics
(
&
mut
self
,
g
:
&
'a
Generics
)
{
debug!
(
"visit_generics: st={:?}"
,
self
.st
);
SawGenerics
.hash
(
self
.st
);
visit
::
walk_generics
(
self
,
g
)
}
fn
visit_fn
(
&
mut
self
,
fk
:
FnKind
<
'a
>
,
fd
:
&
'a
FnDecl
,
b
:
&
'a
Block
,
s
:
Span
,
_
:
NodeId
)
{
debug!
(
"visit_fn: st={:?}"
,
self
.st
);
SawFn
.hash
(
self
.st
);
visit
::
walk_fn
(
self
,
fk
,
fd
,
b
,
s
)
}
fn
visit_trait_item
(
&
mut
self
,
ti
:
&
'a
TraitItem
)
{
debug!
(
"visit_trait_item: st={:?}"
,
self
.st
);
SawTraitItem
.hash
(
self
.st
);
visit
::
walk_trait_item
(
self
,
ti
)
}
fn
visit_impl_item
(
&
mut
self
,
ii
:
&
'a
ImplItem
)
{
debug!
(
"visit_impl_item: st={:?}"
,
self
.st
);
SawImplItem
.hash
(
self
.st
);
visit
::
walk_impl_item
(
self
,
ii
)
}
fn
visit_struct_field
(
&
mut
self
,
s
:
&
'a
StructField
)
{
debug!
(
"visit_struct_field: st={:?}"
,
self
.st
);
SawStructField
.hash
(
self
.st
);
visit
::
walk_struct_field
(
self
,
s
)
}
fn
visit_path
(
&
mut
self
,
path
:
&
'a
Path
,
_
:
ast
::
NodeId
)
{
debug!
(
"visit_path: st={:?}"
,
self
.st
);
SawPath
.hash
(
self
.st
);
visit
::
walk_path
(
self
,
path
)
}
fn
visit_block
(
&
mut
self
,
b
:
&
'a
Block
)
{
debug!
(
"visit_block: st={:?}"
,
self
.st
);
SawBlock
.hash
(
self
.st
);
visit
::
walk_block
(
self
,
b
)
}
fn
visit_pat
(
&
mut
self
,
p
:
&
'a
Pat
)
{
debug!
(
"visit_pat: st={:?}"
,
self
.st
);
SawPat
.hash
(
self
.st
);
visit
::
walk_pat
(
self
,
p
)
}
fn
visit_local
(
&
mut
self
,
l
:
&
'a
Local
)
{
debug!
(
"visit_local: st={:?}"
,
self
.st
);
SawLocal
.hash
(
self
.st
);
visit
::
walk_local
(
self
,
l
)
}
fn
visit_arm
(
&
mut
self
,
a
:
&
'a
Arm
)
{
debug!
(
"visit_arm: st={:?}"
,
self
.st
);
SawArm
.hash
(
self
.st
);
visit
::
walk_arm
(
self
,
a
)
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录