Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3baec3cd
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,发现更多精彩内容 >>
提交
3baec3cd
编写于
7月 31, 2018
作者:
M
Mark Rousskov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add HirId to VisibilityKind::Restricted
上级
39e95165
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
56 addition
and
39 deletion
+56
-39
src/librustc/hir/intravisit.rs
src/librustc/hir/intravisit.rs
+13
-13
src/librustc/hir/lowering.rs
src/librustc/hir/lowering.rs
+25
-12
src/librustc/hir/mod.rs
src/librustc/hir/mod.rs
+2
-1
src/librustc/ich/impls_hir.rs
src/librustc/ich/impls_hir.rs
+3
-1
src/librustc/lint/context.rs
src/librustc/lint/context.rs
+1
-1
src/librustc/lint/mod.rs
src/librustc/lint/mod.rs
+1
-1
src/librustc/middle/dead.rs
src/librustc/middle/dead.rs
+1
-1
src/librustc/middle/resolve_lifetime.rs
src/librustc/middle/resolve_lifetime.rs
+1
-1
src/librustc/middle/stability.rs
src/librustc/middle/stability.rs
+2
-1
src/librustc_lint/builtin.rs
src/librustc_lint/builtin.rs
+1
-2
src/librustc_passes/hir_stats.rs
src/librustc_passes/hir_stats.rs
+2
-2
src/librustc_privacy/lib.rs
src/librustc_privacy/lib.rs
+2
-3
src/librustdoc/clean/auto_trait.rs
src/librustdoc/clean/auto_trait.rs
+1
-0
src/librustdoc/clean/blanket_impl.rs
src/librustdoc/clean/blanket_impl.rs
+1
-0
未找到文件。
src/librustc/hir/intravisit.rs
浏览文件 @
3baec3cd
...
...
@@ -353,10 +353,10 @@ fn visit_generic_arg(&mut self, generic_arg: &'v GenericArg) {
fn
visit_lifetime
(
&
mut
self
,
lifetime
:
&
'v
Lifetime
)
{
walk_lifetime
(
self
,
lifetime
)
}
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'v
QPath
,
id
:
Node
Id
,
span
:
Span
)
{
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'v
QPath
,
id
:
Hir
Id
,
span
:
Span
)
{
walk_qpath
(
self
,
qpath
,
id
,
span
)
}
fn
visit_path
(
&
mut
self
,
path
:
&
'v
Path
,
_
id
:
Node
Id
)
{
fn
visit_path
(
&
mut
self
,
path
:
&
'v
Path
,
_
id
:
Hir
Id
)
{
walk_path
(
self
,
path
)
}
fn
visit_path_segment
(
&
mut
self
,
path_span
:
Span
,
path_segment
:
&
'v
PathSegment
)
{
...
...
@@ -456,7 +456,7 @@ pub fn walk_trait_ref<'v, V>(visitor: &mut V, trait_ref: &'v TraitRef)
where
V
:
Visitor
<
'v
>
{
visitor
.visit_id
(
trait_ref
.ref_id
);
visitor
.visit_path
(
&
trait_ref
.path
,
trait_ref
.ref_id
)
visitor
.visit_path
(
&
trait_ref
.path
,
trait_ref
.
hir_
ref_id
)
}
pub
fn
walk_item
<
'v
,
V
:
Visitor
<
'v
>>
(
visitor
:
&
mut
V
,
item
:
&
'v
Item
)
{
...
...
@@ -471,7 +471,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
}
ItemKind
::
Use
(
ref
path
,
_
)
=>
{
visitor
.visit_id
(
item
.id
);
visitor
.visit_path
(
path
,
item
.id
);
visitor
.visit_path
(
path
,
item
.
hir_
id
);
}
ItemKind
::
Static
(
ref
typ
,
_
,
body
)
|
ItemKind
::
Const
(
ref
typ
,
body
)
=>
{
...
...
@@ -602,7 +602,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
visitor
.visit_fn_decl
(
&
function_declaration
.decl
);
}
TyKind
::
Path
(
ref
qpath
)
=>
{
visitor
.visit_qpath
(
qpath
,
typ
.id
,
typ
.span
);
visitor
.visit_qpath
(
qpath
,
typ
.
hir_
id
,
typ
.span
);
}
TyKind
::
Array
(
ref
ty
,
ref
length
)
=>
{
visitor
.visit_ty
(
ty
);
...
...
@@ -621,7 +621,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
}
}
pub
fn
walk_qpath
<
'v
,
V
:
Visitor
<
'v
>>
(
visitor
:
&
mut
V
,
qpath
:
&
'v
QPath
,
id
:
Node
Id
,
span
:
Span
)
{
pub
fn
walk_qpath
<
'v
,
V
:
Visitor
<
'v
>>
(
visitor
:
&
mut
V
,
qpath
:
&
'v
QPath
,
id
:
Hir
Id
,
span
:
Span
)
{
match
*
qpath
{
QPath
::
Resolved
(
ref
maybe_qself
,
ref
path
)
=>
{
if
let
Some
(
ref
qself
)
=
*
maybe_qself
{
...
...
@@ -670,14 +670,14 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat) {
visitor
.visit_id
(
pattern
.id
);
match
pattern
.node
{
PatKind
::
TupleStruct
(
ref
qpath
,
ref
children
,
_
)
=>
{
visitor
.visit_qpath
(
qpath
,
pattern
.id
,
pattern
.span
);
visitor
.visit_qpath
(
qpath
,
pattern
.
hir_
id
,
pattern
.span
);
walk_list!
(
visitor
,
visit_pat
,
children
);
}
PatKind
::
Path
(
ref
qpath
)
=>
{
visitor
.visit_qpath
(
qpath
,
pattern
.id
,
pattern
.span
);
visitor
.visit_qpath
(
qpath
,
pattern
.
hir_
id
,
pattern
.span
);
}
PatKind
::
Struct
(
ref
qpath
,
ref
fields
,
_
)
=>
{
visitor
.visit_qpath
(
qpath
,
pattern
.id
,
pattern
.span
);
visitor
.visit_qpath
(
qpath
,
pattern
.
hir_
id
,
pattern
.span
);
for
field
in
fields
{
visitor
.visit_id
(
field
.node.id
);
visitor
.visit_ident
(
field
.node.ident
);
...
...
@@ -985,7 +985,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
visitor
.visit_anon_const
(
count
)
}
ExprKind
::
Struct
(
ref
qpath
,
ref
fields
,
ref
optional_base
)
=>
{
visitor
.visit_qpath
(
qpath
,
expression
.id
,
expression
.span
);
visitor
.visit_qpath
(
qpath
,
expression
.
hir_
id
,
expression
.span
);
for
field
in
fields
{
visitor
.visit_id
(
field
.id
);
visitor
.visit_ident
(
field
.ident
);
...
...
@@ -1062,7 +1062,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
visitor
.visit_expr
(
index_expression
)
}
ExprKind
::
Path
(
ref
qpath
)
=>
{
visitor
.visit_qpath
(
qpath
,
expression
.id
,
expression
.span
);
visitor
.visit_qpath
(
qpath
,
expression
.
hir_
id
,
expression
.span
);
}
ExprKind
::
Break
(
ref
destination
,
ref
opt_expr
)
=>
{
if
let
Some
(
ref
label
)
=
destination
.label
{
...
...
@@ -1108,9 +1108,9 @@ 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
}
=
vis
.node
{
if
let
VisibilityKind
::
Restricted
{
ref
path
,
id
,
hir_id
}
=
vis
.node
{
visitor
.visit_id
(
id
);
visitor
.visit_path
(
path
,
id
)
visitor
.visit_path
(
path
,
hir_
id
)
}
}
...
...
src/librustc/hir/lowering.rs
浏览文件 @
3baec3cd
...
...
@@ -2155,12 +2155,14 @@ fn visit_lifetime(&mut self, lifetime: &'v hir::Lifetime) {
let
future_path
=
this
.std_path
(
span
,
&
[
"future"
,
"Future"
],
Some
(
future_params
),
false
);
let
LoweredNodeId
{
node_id
,
hir_id
}
=
this
.next_id
();
let
mut
bounds
=
vec!
[
hir
::
GenericBound
::
Trait
(
hir
::
PolyTraitRef
{
trait_ref
:
hir
::
TraitRef
{
path
:
future_path
,
ref_id
:
this
.next_id
()
.node_id
,
ref_id
:
node_id
,
hir_ref_id
:
hir_id
,
},
bound_generic_params
:
hir_vec!
[],
span
,
...
...
@@ -2482,9 +2484,11 @@ fn lower_trait_ref(&mut self, p: &TraitRef, itctx: ImplTraitContext) -> hir::Tra
hir
::
QPath
::
Resolved
(
None
,
path
)
=>
path
.and_then
(|
path
|
path
),
qpath
=>
bug!
(
"lower_trait_ref: unexpected QPath `{:?}`"
,
qpath
),
};
let
LoweredNodeId
{
node_id
,
hir_id
}
=
self
.lower_node_id
(
p
.ref_id
);
hir
::
TraitRef
{
path
,
ref_id
:
self
.lower_node_id
(
p
.ref_id
)
.node_id
,
ref_id
:
node_id
,
hir_ref_id
:
hir_id
,
}
}
...
...
@@ -2843,11 +2847,13 @@ 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
::
VisibilityKind
::
Restricted
{
ref
path
,
id
:
_
,
hir_id
:
_
}
=>
{
let
id
=
this
.next_id
();
hir
::
VisibilityKind
::
Restricted
{
path
:
path
.clone
(),
// We are allocating a new NodeId here
id
:
this
.next_id
()
.node_id
,
id
:
id
.node_id
,
hir_id
:
id
.hir_id
,
}
}
};
...
...
@@ -2916,11 +2922,13 @@ 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
::
VisibilityKind
::
Restricted
{
ref
path
,
id
:
_
,
hir_id
:
_
}
=>
{
let
id
=
this
.next_id
();
hir
::
VisibilityKind
::
Restricted
{
path
:
path
.clone
(),
// We are allocating a new NodeId here
id
:
this
.next_id
()
.node_id
,
id
:
id
.node_id
,
hir_id
:
id
.hir_id
,
}
}
};
...
...
@@ -4350,13 +4358,17 @@ fn lower_visibility(
let
node
=
match
v
.node
{
VisibilityKind
::
Public
=>
hir
::
VisibilityKind
::
Public
,
VisibilityKind
::
Crate
(
sugar
)
=>
hir
::
VisibilityKind
::
Crate
(
sugar
),
VisibilityKind
::
Restricted
{
ref
path
,
id
}
=>
hir
::
VisibilityKind
::
Restricted
{
path
:
P
(
self
.lower_path
(
id
,
path
,
ParamMode
::
Explicit
)),
id
:
if
let
Some
(
owner
)
=
explicit_owner
{
self
.lower_node_id_with_owner
(
id
,
owner
)
.node_id
VisibilityKind
::
Restricted
{
ref
path
,
id
}
=>
{
let
lowered_id
=
if
let
Some
(
owner
)
=
explicit_owner
{
self
.lower_node_id_with_owner
(
id
,
owner
)
}
else
{
self
.lower_node_id
(
id
)
.node_id
},
self
.lower_node_id
(
id
)
};
hir
::
VisibilityKind
::
Restricted
{
path
:
P
(
self
.lower_path
(
id
,
path
,
ParamMode
::
Explicit
)),
id
:
lowered_id
.node_id
,
hir_id
:
lowered_id
.hir_id
,
}
},
VisibilityKind
::
Inherited
=>
hir
::
VisibilityKind
::
Inherited
,
};
...
...
@@ -4675,6 +4687,7 @@ fn ty_path(&mut self, id: LoweredNodeId, span: Span, qpath: hir::QPath) -> hir::
trait_ref
:
hir
::
TraitRef
{
path
:
path
.and_then
(|
path
|
path
),
ref_id
:
id
.node_id
,
hir_ref_id
:
id
.hir_id
,
},
span
,
};
...
...
src/librustc/hir/mod.rs
浏览文件 @
3baec3cd
...
...
@@ -1912,6 +1912,7 @@ pub enum UseKind {
pub
struct
TraitRef
{
pub
path
:
Path
,
pub
ref_id
:
NodeId
,
pub
hir_ref_id
:
HirId
,
}
#[derive(Clone,
RustcEncodable,
RustcDecodable,
Debug)]
...
...
@@ -1931,7 +1932,7 @@ pub struct PolyTraitRef {
pub
enum
VisibilityKind
{
Public
,
Crate
(
CrateSugar
),
Restricted
{
path
:
P
<
Path
>
,
id
:
NodeId
},
Restricted
{
path
:
P
<
Path
>
,
id
:
NodeId
,
hir_id
:
HirId
},
Inherited
,
}
...
...
src/librustc/ich/impls_hir.rs
浏览文件 @
3baec3cd
...
...
@@ -360,6 +360,7 @@ fn hash_stable<W: StableHasherResult>(&self,
impl_stable_hash_for!
(
struct
hir
::
TraitRef
{
// Don't hash the ref_id. It is tracked via the thing it is used to access
ref_id
->
_
,
hir_ref_id
->
_
,
path
,
});
...
...
@@ -723,9 +724,10 @@ fn hash_stable<W: StableHasherResult>(&self,
hir
::
VisibilityKind
::
Crate
(
sugar
)
=>
{
sugar
.hash_stable
(
hcx
,
hasher
);
}
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
id
}
=>
{
hir
::
VisibilityKind
::
Restricted
{
ref
path
,
id
,
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
);
}
...
...
src/librustc/lint/context.rs
浏览文件 @
3baec3cd
...
...
@@ -869,7 +869,7 @@ fn visit_lifetime(&mut self, lt: &'tcx hir::Lifetime) {
hir_visit
::
walk_lifetime
(
self
,
lt
);
}
fn
visit_path
(
&
mut
self
,
p
:
&
'tcx
hir
::
Path
,
id
:
ast
::
Node
Id
)
{
fn
visit_path
(
&
mut
self
,
p
:
&
'tcx
hir
::
Path
,
id
:
hir
::
Hir
Id
)
{
run_lints!
(
self
,
check_path
,
p
,
id
);
hir_visit
::
walk_path
(
self
,
p
);
}
...
...
src/librustc/lint/mod.rs
浏览文件 @
3baec3cd
...
...
@@ -242,7 +242,7 @@ fn check_struct_def_post(
fn
check_variant
(
a
:
&
$hir
hir
::
Variant
,
b
:
&
$hir
hir
::
Generics
);
fn
check_variant_post
(
a
:
&
$hir
hir
::
Variant
,
b
:
&
$hir
hir
::
Generics
);
fn
check_lifetime
(
a
:
&
$hir
hir
::
Lifetime
);
fn
check_path
(
a
:
&
$hir
hir
::
Path
,
b
:
ast
::
Node
Id
);
fn
check_path
(
a
:
&
$hir
hir
::
Path
,
b
:
hir
::
Hir
Id
);
fn
check_attribute
(
a
:
&
$hir
ast
::
Attribute
);
/// Called when entering a syntax node that can have lint attributes such
...
...
src/librustc/middle/dead.rs
浏览文件 @
3baec3cd
...
...
@@ -279,7 +279,7 @@ fn visit_pat(&mut self, pat: &'tcx hir::Pat) {
self
.in_pat
=
false
;
}
fn
visit_path
(
&
mut
self
,
path
:
&
'tcx
hir
::
Path
,
_
:
ast
::
Node
Id
)
{
fn
visit_path
(
&
mut
self
,
path
:
&
'tcx
hir
::
Path
,
_
:
hir
::
Hir
Id
)
{
self
.handle_definition
(
path
.def
);
intravisit
::
walk_path
(
self
,
path
);
}
...
...
src/librustc/middle/resolve_lifetime.rs
浏览文件 @
3baec3cd
...
...
@@ -903,7 +903,7 @@ fn visit_lifetime(&mut self, lifetime_ref: &'tcx hir::Lifetime) {
self
.resolve_lifetime_ref
(
lifetime_ref
);
}
fn
visit_path
(
&
mut
self
,
path
:
&
'tcx
hir
::
Path
,
_
:
ast
::
Node
Id
)
{
fn
visit_path
(
&
mut
self
,
path
:
&
'tcx
hir
::
Path
,
_
:
hir
::
Hir
Id
)
{
for
(
i
,
segment
)
in
path
.segments
.iter
()
.enumerate
()
{
let
depth
=
path
.segments
.len
()
-
i
-
1
;
if
let
Some
(
ref
args
)
=
segment
.args
{
...
...
src/librustc/middle/stability.rs
浏览文件 @
3baec3cd
...
...
@@ -780,7 +780,8 @@ fn visit_item(&mut self, item: &'tcx hir::Item) {
intravisit
::
walk_item
(
self
,
item
);
}
fn
visit_path
(
&
mut
self
,
path
:
&
'tcx
hir
::
Path
,
id
:
ast
::
NodeId
)
{
fn
visit_path
(
&
mut
self
,
path
:
&
'tcx
hir
::
Path
,
id
:
hir
::
HirId
)
{
let
id
=
self
.tcx.hir
.hir_to_node_id
(
id
);
match
path
.def
{
Def
::
Local
(
..
)
|
Def
::
Upvar
(
..
)
|
Def
::
PrimTy
(
..
)
|
Def
::
SelfTy
(
..
)
|
Def
::
Err
=>
{}
...
...
src/librustc_lint/builtin.rs
浏览文件 @
3baec3cd
...
...
@@ -1526,7 +1526,6 @@ fn suggest_changing_assoc_types(ty: &hir::Ty, err: &mut DiagnosticBuilder) {
// We use a HIR visitor to walk the type.
use
rustc
::
hir
::
intravisit
::{
self
,
Visitor
};
use
syntax
::
ast
::
NodeId
;
struct
WalkAssocTypes
<
'a
,
'db
>
where
'db
:
'a
{
err
:
&
'a
mut
DiagnosticBuilder
<
'db
>
}
...
...
@@ -1536,7 +1535,7 @@ fn nested_visit_map<'this>(&'this mut self) -> intravisit::NestedVisitorMap<'thi
intravisit
::
NestedVisitorMap
::
None
}
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'v
hir
::
QPath
,
id
:
Node
Id
,
span
:
Span
)
{
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'v
hir
::
QPath
,
id
:
hir
::
Hir
Id
,
span
:
Span
)
{
if
TypeAliasBounds
::
is_type_variable_assoc
(
qpath
)
{
self
.err
.span_help
(
span
,
"use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to
\
...
...
src/librustc_passes/hir_stats.rs
浏览文件 @
3baec3cd
...
...
@@ -224,11 +224,11 @@ fn visit_lifetime(&mut self, lifetime: &'v hir::Lifetime) {
self
.record
(
"Lifetime"
,
Id
::
Node
(
lifetime
.id
),
lifetime
);
hir_visit
::
walk_lifetime
(
self
,
lifetime
)
}
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'v
hir
::
QPath
,
id
:
Node
Id
,
span
:
Span
)
{
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'v
hir
::
QPath
,
id
:
hir
::
Hir
Id
,
span
:
Span
)
{
self
.record
(
"QPath"
,
Id
::
None
,
qpath
);
hir_visit
::
walk_qpath
(
self
,
qpath
,
id
,
span
)
}
fn
visit_path
(
&
mut
self
,
path
:
&
'v
hir
::
Path
,
_
id
:
Node
Id
)
{
fn
visit_path
(
&
mut
self
,
path
:
&
'v
hir
::
Path
,
_
id
:
hir
::
Hir
Id
)
{
self
.record
(
"Path"
,
Id
::
None
,
path
);
hir_visit
::
walk_path
(
self
,
path
)
}
...
...
src/librustc_privacy/lib.rs
浏览文件 @
3baec3cd
...
...
@@ -815,7 +815,7 @@ fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
// we prohibit access to private statics from other crates, this allows to give
// more code internal visibility at link time. (Access to private functions
// is already prohibited by type privacy for function types.)
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'tcx
hir
::
QPath
,
id
:
ast
::
Node
Id
,
span
:
Span
)
{
fn
visit_qpath
(
&
mut
self
,
qpath
:
&
'tcx
hir
::
QPath
,
id
:
hir
::
Hir
Id
,
span
:
Span
)
{
let
def
=
match
*
qpath
{
hir
::
QPath
::
Resolved
(
_
,
ref
path
)
=>
match
path
.def
{
Def
::
Method
(
..
)
|
Def
::
AssociatedConst
(
..
)
|
...
...
@@ -823,8 +823,7 @@ fn visit_qpath(&mut self, qpath: &'tcx hir::QPath, id: ast::NodeId, span: Span)
_
=>
None
,
}
hir
::
QPath
::
TypeRelative
(
..
)
=>
{
let
hir_id
=
self
.tcx.hir
.node_to_hir_id
(
id
);
self
.tables
.type_dependent_defs
()
.get
(
hir_id
)
.cloned
()
self
.tables
.type_dependent_defs
()
.get
(
id
)
.cloned
()
}
};
if
let
Some
(
def
)
=
def
{
...
...
src/librustdoc/clean/auto_trait.rs
浏览文件 @
3baec3cd
...
...
@@ -126,6 +126,7 @@ fn get_auto_trait_impl_for<F>(
let
trait_
=
hir
::
TraitRef
{
path
:
get_path_for_type
(
self
.cx.tcx
,
trait_def_id
,
hir
::
def
::
Def
::
Trait
),
ref_id
:
ast
::
DUMMY_NODE_ID
,
hir_ref_id
:
hir
::
DUMMY_HIR_ID
,
};
let
polarity
;
...
...
src/librustdoc/clean/blanket_impl.rs
浏览文件 @
3baec3cd
...
...
@@ -119,6 +119,7 @@ pub fn get_blanket_impls<F>(
trait_def_id
,
hir
::
def
::
Def
::
Trait
),
ref_id
:
ast
::
DUMMY_NODE_ID
,
hir_ref_id
:
hir
::
DUMMY_HIR_ID
,
};
let
provided_trait_methods
=
infcx
.tcx
.provided_trait_methods
(
trait_def_id
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录