Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
4beb7515
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,发现更多精彩内容 >>
提交
4beb7515
编写于
7月 24, 2019
作者:
M
Mark Rousskov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Gather deprecation information during cleaning
上级
11735b62
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
56 deletion
+21
-56
src/librustdoc/clean/mod.rs
src/librustdoc/clean/mod.rs
+16
-16
src/librustdoc/core.rs
src/librustdoc/core.rs
+5
-0
src/librustdoc/doctree.rs
src/librustdoc/doctree.rs
+0
-18
src/librustdoc/visit_ast.rs
src/librustdoc/visit_ast.rs
+0
-22
未找到文件。
src/librustdoc/clean/mod.rs
浏览文件 @
4beb7515
...
...
@@ -655,7 +655,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
source
:
whence
.clean
(
cx
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.hid
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.hid
)
.clean
(
cx
),
def_id
:
cx
.tcx
.hir
()
.local_def_id_from_node_id
(
self
.id
),
inner
:
ModuleItem
(
Module
{
is_crate
:
self
.is_crate
,
...
...
@@ -1941,7 +1941,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
source
:
self
.whence
.clean
(
cx
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
def_id
:
did
,
inner
:
FunctionItem
(
Function
{
decl
,
...
...
@@ -2141,7 +2141,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
TraitItem
(
Trait
{
auto
:
self
.is_auto
.clean
(
cx
),
unsafety
:
self
.unsafety
,
...
...
@@ -2171,7 +2171,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
TraitAliasItem
(
TraitAlias
{
generics
:
self
.generics
.clean
(
cx
),
bounds
:
self
.bounds
.clean
(
cx
),
...
...
@@ -3245,7 +3245,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
StructItem
(
Struct
{
struct_type
:
self
.struct_type
,
generics
:
self
.generics
.clean
(
cx
),
...
...
@@ -3265,7 +3265,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
UnionItem
(
Union
{
struct_type
:
self
.struct_type
,
generics
:
self
.generics
.clean
(
cx
),
...
...
@@ -3312,7 +3312,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
EnumItem
(
Enum
{
variants
:
self
.variants
.iter
()
.map
(|
v
|
v
.clean
(
cx
))
.collect
(),
generics
:
self
.generics
.clean
(
cx
),
...
...
@@ -3335,7 +3335,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
source
:
self
.whence
.clean
(
cx
),
visibility
:
None
,
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
inner
:
VariantItem
(
Variant
{
kind
:
self
.def
.clean
(
cx
),
...
...
@@ -3640,7 +3640,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
TypedefItem
(
Typedef
{
type_
:
self
.ty
.clean
(
cx
),
generics
:
self
.gen
.clean
(
cx
),
...
...
@@ -3664,7 +3664,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
OpaqueTyItem
(
OpaqueTy
{
bounds
:
self
.opaque_ty.bounds
.clean
(
cx
),
generics
:
self
.opaque_ty.generics
.clean
(
cx
),
...
...
@@ -3715,7 +3715,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
StaticItem
(
Static
{
type_
:
self
.type_
.clean
(
cx
),
mutability
:
self
.mutability
.clean
(
cx
),
...
...
@@ -3740,7 +3740,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
ConstantItem
(
Constant
{
type_
:
self
.type_
.clean
(
cx
),
expr
:
print_const_expr
(
cx
,
self
.expr
),
...
...
@@ -3827,7 +3827,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Vec<Item> {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
:
ImplItem
(
Impl
{
unsafety
:
self
.unsafety
,
generics
:
self
.generics
.clean
(
cx
),
...
...
@@ -4066,7 +4066,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
visibility
:
self
.vis
.clean
(
cx
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
inner
,
}
}
...
...
@@ -4249,7 +4249,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
source
:
self
.whence
.clean
(
cx
),
visibility
:
Some
(
Public
),
stability
:
cx
.stability
(
self
.hid
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.hid
)
.clean
(
cx
),
def_id
:
self
.def_id
,
inner
:
MacroItem
(
Macro
{
source
:
format!
(
"macro_rules! {} {{
\n
{}}}"
,
...
...
@@ -4277,7 +4277,7 @@ fn clean(&self, cx: &DocContext<'_>) -> Item {
source
:
self
.whence
.clean
(
cx
),
visibility
:
Some
(
Public
),
stability
:
cx
.stability
(
self
.id
)
.clean
(
cx
),
deprecation
:
self
.depr
.clean
(
cx
),
deprecation
:
cx
.deprecation
(
self
.id
)
.clean
(
cx
),
def_id
:
cx
.tcx
.hir
()
.local_def_id
(
self
.id
),
inner
:
ProcMacroItem
(
ProcMacro
{
kind
:
self
.kind
,
...
...
src/librustdoc/core.rs
浏览文件 @
4beb7515
...
...
@@ -171,6 +171,11 @@ pub fn stability(&self, id: HirId) -> Option<attr::Stability> {
self
.tcx
.hir
()
.opt_local_def_id
(
id
)
.and_then
(|
def_id
|
self
.tcx
.lookup_stability
(
def_id
))
.cloned
()
}
pub
fn
deprecation
(
&
self
,
id
:
HirId
)
->
Option
<
attr
::
Deprecation
>
{
self
.tcx
.hir
()
.opt_local_def_id
(
id
)
.and_then
(|
def_id
|
self
.tcx
.lookup_deprecation
(
def_id
))
}
}
pub
trait
DocAccessLevels
{
...
...
src/librustdoc/doctree.rs
浏览文件 @
4beb7515
...
...
@@ -4,7 +4,6 @@
use
syntax
::
ast
;
use
syntax
::
ast
::{
Name
,
NodeId
};
use
syntax
::
attr
;
use
syntax
::
ext
::
base
::
MacroKind
;
use
syntax_pos
::{
self
,
Span
};
...
...
@@ -32,7 +31,6 @@ pub struct Module<'hir> {
pub
constants
:
Vec
<
Constant
<
'hir
>>
,
pub
traits
:
Vec
<
Trait
<
'hir
>>
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
impls
:
Vec
<
Impl
<
'hir
>>
,
pub
foreigns
:
Vec
<
ForeignItem
<
'hir
>>
,
pub
macros
:
Vec
<
Macro
<
'hir
>>
,
...
...
@@ -52,7 +50,6 @@ pub fn new(
id
:
ast
::
CRATE_NODE_ID
,
hid
:
hir
::
CRATE_HIR_ID
,
vis
,
depr
:
None
,
where_outer
:
syntax_pos
::
DUMMY_SP
,
where_inner
:
syntax_pos
::
DUMMY_SP
,
attrs
,
...
...
@@ -90,7 +87,6 @@ pub enum StructType {
pub
struct
Struct
<
'hir
>
{
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
id
:
hir
::
HirId
,
pub
struct_type
:
StructType
,
pub
name
:
Name
,
...
...
@@ -102,7 +98,6 @@ pub struct Struct<'hir> {
pub
struct
Union
<
'hir
>
{
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
id
:
hir
::
HirId
,
pub
struct_type
:
StructType
,
pub
name
:
Name
,
...
...
@@ -114,7 +109,6 @@ pub struct Union<'hir> {
pub
struct
Enum
<
'hir
>
{
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
variants
:
Vec
<
Variant
<
'hir
>>
,
pub
generics
:
&
'hir
hir
::
Generics
,
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
...
...
@@ -128,7 +122,6 @@ pub struct Variant<'hir> {
pub
id
:
hir
::
HirId
,
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
def
:
&
'hir
hir
::
VariantData
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
whence
:
Span
,
}
...
...
@@ -138,7 +131,6 @@ pub struct Function<'hir> {
pub
id
:
hir
::
HirId
,
pub
name
:
Name
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
header
:
hir
::
FnHeader
,
pub
whence
:
Span
,
pub
generics
:
&
'hir
hir
::
Generics
,
...
...
@@ -153,7 +145,6 @@ pub struct Typedef<'hir> {
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
whence
:
Span
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
}
pub
struct
OpaqueTy
<
'hir
>
{
...
...
@@ -163,7 +154,6 @@ pub struct OpaqueTy<'hir> {
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
whence
:
Span
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
}
#[derive(Debug)]
...
...
@@ -174,7 +164,6 @@ pub struct Static<'hir> {
pub
name
:
Name
,
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
id
:
hir
::
HirId
,
pub
whence
:
Span
,
}
...
...
@@ -185,7 +174,6 @@ pub struct Constant<'hir> {
pub
name
:
Name
,
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
id
:
hir
::
HirId
,
pub
whence
:
Span
,
}
...
...
@@ -201,7 +189,6 @@ pub struct Trait<'hir> {
pub
id
:
hir
::
HirId
,
pub
whence
:
Span
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
}
pub
struct
TraitAlias
<
'hir
>
{
...
...
@@ -212,7 +199,6 @@ pub struct TraitAlias<'hir> {
pub
id
:
hir
::
HirId
,
pub
whence
:
Span
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
}
#[derive(Debug)]
...
...
@@ -227,13 +213,11 @@ pub struct Impl<'hir> {
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
whence
:
Span
,
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
id
:
hir
::
HirId
,
}
pub
struct
ForeignItem
<
'hir
>
{
pub
vis
:
&
'hir
hir
::
Visibility
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
id
:
hir
::
HirId
,
pub
name
:
Name
,
pub
kind
:
&
'hir
hir
::
ForeignItemKind
,
...
...
@@ -250,7 +234,6 @@ pub struct Macro<'hir> {
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
whence
:
Span
,
pub
matchers
:
hir
::
HirVec
<
Span
>
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
pub
imported_from
:
Option
<
Name
>
,
}
...
...
@@ -280,7 +263,6 @@ pub struct ProcMacro<'hir> {
pub
helpers
:
Vec
<
Name
>
,
pub
attrs
:
&
'hir
hir
::
HirVec
<
ast
::
Attribute
>
,
pub
whence
:
Span
,
pub
depr
:
Option
<
attr
::
Deprecation
>
,
}
pub
fn
struct_type_from_def
(
vdata
:
&
hir
::
VariantData
)
->
StructType
{
...
...
src/librustdoc/visit_ast.rs
浏览文件 @
4beb7515
...
...
@@ -7,7 +7,6 @@
use
rustc
::
middle
::
privacy
::
AccessLevel
;
use
rustc
::
util
::
nodemap
::{
FxHashSet
,
FxHashMap
};
use
syntax
::
ast
;
use
syntax
::
attr
;
use
syntax
::
ext
::
base
::
MacroKind
;
use
syntax
::
source_map
::
Spanned
;
use
syntax
::
symbol
::
sym
;
...
...
@@ -57,11 +56,6 @@ fn store_path(&mut self, did: DefId) {
}
}
fn
deprecation
(
&
self
,
id
:
hir
::
HirId
)
->
Option
<
attr
::
Deprecation
>
{
self
.cx.tcx
.hir
()
.opt_local_def_id
(
id
)
.and_then
(|
def_id
|
self
.cx.tcx
.lookup_deprecation
(
def_id
))
}
pub
fn
visit
(
mut
self
,
krate
:
&
'tcx
hir
::
Crate
)
->
Module
<
'tcx
>
{
let
mut
module
=
self
.visit_mod_contents
(
krate
.span
,
&
krate
.attrs
,
...
...
@@ -91,7 +85,6 @@ fn visit_variant_data(&mut self, item: &'tcx hir::Item,
struct_type
,
name
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
attrs
:
&
item
.attrs
,
generics
,
fields
:
sd
.fields
(),
...
...
@@ -109,7 +102,6 @@ fn visit_union_data(&mut self, item: &'tcx hir::Item,
struct_type
,
name
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
attrs
:
&
item
.attrs
,
generics
,
fields
:
sd
.fields
(),
...
...
@@ -127,12 +119,10 @@ fn visit_enum_def(&mut self, it: &'tcx hir::Item,
name
:
v
.node.ident.name
,
id
:
v
.node.id
,
attrs
:
&
v
.node.attrs
,
depr
:
self
.deprecation
(
v
.node.id
),
def
:
&
v
.node.data
,
whence
:
v
.span
,
})
.collect
(),
vis
:
&
it
.vis
,
depr
:
self
.deprecation
(
it
.hir_id
),
generics
,
attrs
:
&
it
.attrs
,
id
:
it
.hir_id
,
...
...
@@ -191,14 +181,12 @@ fn visit_fn(&mut self, om: &mut Module<'tcx>, item: &'tcx hir::Item,
helpers
,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
depr
:
self
.deprecation
(
item
.hir_id
),
});
}
None
=>
{
om
.fns
.push
(
Function
{
id
:
item
.hir_id
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
attrs
:
&
item
.attrs
,
decl
,
name
,
...
...
@@ -218,7 +206,6 @@ fn visit_mod_contents(&mut self, span: Span, attrs: &'tcx hir::HirVec<ast::Attri
let
mut
om
=
Module
::
new
(
name
,
attrs
,
vis
);
om
.where_outer
=
span
;
om
.where_inner
=
m
.inner
;
om
.depr
=
self
.deprecation
(
id
);
om
.hid
=
id
;
om
.id
=
self
.cx.tcx
.hir
()
.hir_to_node_id
(
id
);
// Keep track of if there were any private modules in the path.
...
...
@@ -449,7 +436,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.typedefs
.push
(
t
);
},
...
...
@@ -461,7 +447,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.opaque_tys
.push
(
t
);
},
...
...
@@ -475,7 +460,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.statics
.push
(
s
);
},
...
...
@@ -488,7 +472,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.constants
.push
(
s
);
},
...
...
@@ -507,7 +490,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.traits
.push
(
t
);
},
...
...
@@ -520,7 +502,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
attrs
:
&
item
.attrs
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.trait_aliases
.push
(
t
);
},
...
...
@@ -550,7 +531,6 @@ fn visit_item(&mut self, item: &'tcx hir::Item,
id
:
item
.hir_id
,
whence
:
item
.span
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
};
om
.impls
.push
(
i
);
}
...
...
@@ -570,7 +550,6 @@ fn visit_foreign_item(&mut self, item: &'tcx hir::ForeignItem,
name
:
renamed
.unwrap_or
(
item
.ident
)
.name
,
kind
:
&
item
.node
,
vis
:
&
item
.vis
,
depr
:
self
.deprecation
(
item
.hir_id
),
attrs
:
&
item
.attrs
,
whence
:
item
.span
});
...
...
@@ -594,7 +573,6 @@ fn visit_local_macro(
name
:
renamed
.unwrap_or
(
def
.name
),
whence
:
def
.span
,
matchers
,
depr
:
self
.deprecation
(
def
.hir_id
),
imported_from
:
None
,
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录