Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
9cd18459
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,发现更多精彩内容 >>
提交
9cd18459
编写于
2月 26, 2019
作者:
L
ljedrz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hir: remove NodeId from VisibilityKind
上级
01cf66bb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
9 deletion
+5
-9
src/librustc/hir/intravisit.rs
src/librustc/hir/intravisit.rs
+1
-1
src/librustc/hir/lowering.rs
src/librustc/hir/lowering.rs
+2
-5
src/librustc/hir/mod.rs
src/librustc/hir/mod.rs
+1
-1
src/librustc/ich/impls_hir.rs
src/librustc/ich/impls_hir.rs
+1
-2
未找到文件。
src/librustc/hir/intravisit.rs
浏览文件 @
9cd18459
...
...
@@ -1105,7 +1105,7 @@ pub fn walk_arm<'v, V: Visitor<'v>>(visitor: &mut V, arm: &'v Arm) {
}
pub
fn
walk_vis
<
'v
,
V
:
Visitor
<
'v
>>
(
visitor
:
&
mut
V
,
vis
:
&
'v
Visibility
)
{
if
let
VisibilityKind
::
Restricted
{
ref
path
,
id
:
_
,
hir_id
}
=
vis
.node
{
if
let
VisibilityKind
::
Restricted
{
ref
path
,
hir_id
}
=
vis
.node
{
visitor
.visit_id
(
hir_id
);
visitor
.visit_path
(
path
,
hir_id
)
}
...
...
src/librustc/hir/lowering.rs
浏览文件 @
9cd18459
...
...
@@ -3115,12 +3115,11 @@ fn lower_use_tree(
hir
::
VisibilityKind
::
Public
=>
hir
::
VisibilityKind
::
Public
,
hir
::
VisibilityKind
::
Crate
(
sugar
)
=>
hir
::
VisibilityKind
::
Crate
(
sugar
),
hir
::
VisibilityKind
::
Inherited
=>
hir
::
VisibilityKind
::
Inherited
,
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
id
:
_
,
hir_id
:
_
}
=>
{
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
hir_id
:
_
}
=>
{
let
id
=
this
.next_id
();
let
path
=
this
.renumber_segment_ids
(
path
);
hir
::
VisibilityKind
::
Restricted
{
path
,
id
:
id
.node_id
,
hir_id
:
id
.hir_id
,
}
}
...
...
@@ -3222,12 +3221,11 @@ fn lower_use_tree(
hir
::
VisibilityKind
::
Public
=>
hir
::
VisibilityKind
::
Public
,
hir
::
VisibilityKind
::
Crate
(
sugar
)
=>
hir
::
VisibilityKind
::
Crate
(
sugar
),
hir
::
VisibilityKind
::
Inherited
=>
hir
::
VisibilityKind
::
Inherited
,
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
id
:
_
,
hir_id
:
_
}
=>
{
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
hir_id
:
_
}
=>
{
let
id
=
this
.next_id
();
let
path
=
this
.renumber_segment_ids
(
path
);
hir
::
VisibilityKind
::
Restricted
{
path
:
path
,
id
:
id
.node_id
,
hir_id
:
id
.hir_id
,
}
}
...
...
@@ -4721,7 +4719,6 @@ fn lower_visibility(
ParamMode
::
Explicit
,
explicit_owner
,
)),
id
:
lowered_id
.node_id
,
hir_id
:
lowered_id
.hir_id
,
}
},
...
...
src/librustc/hir/mod.rs
浏览文件 @
9cd18459
...
...
@@ -2096,7 +2096,7 @@ pub struct PolyTraitRef {
pub
enum
VisibilityKind
{
Public
,
Crate
(
CrateSugar
),
Restricted
{
path
:
P
<
Path
>
,
id
:
NodeId
,
hir_id
:
HirId
},
Restricted
{
path
:
P
<
Path
>
,
hir_id
:
HirId
},
Inherited
,
}
...
...
src/librustc/ich/impls_hir.rs
浏览文件 @
9cd18459
...
...
@@ -748,9 +748,8 @@ fn hash_stable<W: StableHasherResult>(&self,
hir
::
VisibilityKind
::
Crate
(
sugar
)
=>
{
sugar
.hash_stable
(
hcx
,
hasher
);
}
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
id
,
hir_id
}
=>
{
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
hir_id
}
=>
{
hcx
.with_node_id_hashing_mode
(
NodeIdHashingMode
::
HashDefPath
,
|
hcx
|
{
id
.hash_stable
(
hcx
,
hasher
);
hir_id
.hash_stable
(
hcx
,
hasher
);
});
path
.hash_stable
(
hcx
,
hasher
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录