Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
78f91e39
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,发现更多精彩内容 >>
提交
78f91e39
编写于
3月 06, 2019
作者:
L
ljedrz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hir: remove NodeId from PathSegment
上级
cd06038b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
4 addition
and
14 deletion
+4
-14
src/librustc/hir/lowering.rs
src/librustc/hir/lowering.rs
+4
-7
src/librustc/hir/mod.rs
src/librustc/hir/mod.rs
+0
-4
src/librustc/ich/impls_hir.rs
src/librustc/ich/impls_hir.rs
+0
-1
src/librustdoc/clean/mod.rs
src/librustdoc/clean/mod.rs
+0
-1
src/librustdoc/core.rs
src/librustdoc/core.rs
+0
-1
未找到文件。
src/librustc/hir/lowering.rs
浏览文件 @
78f91e39
...
...
@@ -1932,7 +1932,6 @@ fn lower_path_segment(
hir
::
PathSegment
::
new
(
segment
.ident
,
Some
(
id
.node_id
),
Some
(
id
.hir_id
),
Some
(
def
),
generic_args
,
...
...
@@ -3276,10 +3275,8 @@ fn renumber_segment_ids(&mut self, path: &P<hir::Path>) -> P<hir::Path> {
debug!
(
"renumber_segment_ids(path = {:?})"
,
path
);
let
mut
path
=
path
.clone
();
for
seg
in
path
.segments
.iter_mut
()
{
if
seg
.id
.is_some
()
{
let
next_id
=
self
.next_id
();
seg
.id
=
Some
(
next_id
.node_id
);
seg
.hir_id
=
Some
(
next_id
.hir_id
);
if
seg
.hir_id
.is_some
()
{
seg
.hir_id
=
Some
(
self
.next_id
()
.hir_id
);
}
}
path
...
...
@@ -5024,8 +5021,8 @@ fn std_path(
for
seg
in
path
.segments
.iter_mut
()
{
if
let
Some
(
id
)
=
seg
.id
{
seg
.
id
=
Some
(
self
.lower_node_id
(
id
)
.node
_id
);
if
seg
.hir_id
.is_some
()
{
seg
.
hir_id
=
Some
(
self
.next_id
()
.hir
_id
);
}
}
path
...
...
src/librustc/hir/mod.rs
浏览文件 @
78f91e39
...
...
@@ -327,7 +327,6 @@ pub struct PathSegment {
// therefore will not have 'jump to def' in IDEs, but otherwise will not be
// affected. (In general, we don't bother to get the defs for synthesized
// segments, only for segments which have come from the AST).
pub
id
:
Option
<
NodeId
>
,
pub
hir_id
:
Option
<
HirId
>
,
pub
def
:
Option
<
Def
>
,
...
...
@@ -350,7 +349,6 @@ impl PathSegment {
pub
fn
from_ident
(
ident
:
Ident
)
->
PathSegment
{
PathSegment
{
ident
,
id
:
None
,
hir_id
:
None
,
def
:
None
,
infer_types
:
true
,
...
...
@@ -360,7 +358,6 @@ pub fn from_ident(ident: Ident) -> PathSegment {
pub
fn
new
(
ident
:
Ident
,
id
:
Option
<
NodeId
>
,
hir_id
:
Option
<
HirId
>
,
def
:
Option
<
Def
>
,
args
:
GenericArgs
,
...
...
@@ -368,7 +365,6 @@ pub fn new(
)
->
Self
{
PathSegment
{
ident
,
id
,
hir_id
,
def
,
infer_types
,
...
...
src/librustc/ich/impls_hir.rs
浏览文件 @
78f91e39
...
...
@@ -171,7 +171,6 @@ fn hash_stable<W: StableHasherResult>(&self,
impl_stable_hash_for!
(
struct
hir
::
PathSegment
{
ident
->
(
ident
.name
),
id
,
hir_id
,
def
,
infer_types
,
...
...
src/librustdoc/clean/mod.rs
浏览文件 @
78f91e39
...
...
@@ -4250,7 +4250,6 @@ fn push(&mut self, text: &str) {
def
:
def_ctor
(
def_id
),
segments
:
hir
::
HirVec
::
from_vec
(
apb
.names
.iter
()
.map
(|
s
|
hir
::
PathSegment
{
ident
:
ast
::
Ident
::
from_str
(
&
s
),
id
:
None
,
hir_id
:
None
,
def
:
None
,
args
:
None
,
...
...
src/librustdoc/core.rs
浏览文件 @
78f91e39
...
...
@@ -191,7 +191,6 @@ pub fn get_real_ty<F>(&self,
real_name
.unwrap_or
(
last
.ident
),
None
,
None
,
None
,
self
.generics_to_path_params
(
generics
.clone
()),
false
,
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录