Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
08f3685a
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,发现更多精彩内容 >>
提交
08f3685a
编写于
8月 22, 2018
作者:
V
varkor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unnecessary TyKind::s
上级
8a5dccde
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
13 addition
and
13 deletion
+13
-13
src/librustc/middle/dead.rs
src/librustc/middle/dead.rs
+1
-1
src/librustc/traits/error_reporting.rs
src/librustc/traits/error_reporting.rs
+2
-2
src/librustc/ty/util.rs
src/librustc/ty/util.rs
+1
-1
src/librustc_borrowck/borrowck/mod.rs
src/librustc_borrowck/borrowck/mod.rs
+1
-1
src/librustc_mir/borrow_check/error_reporting.rs
src/librustc_mir/borrow_check/error_reporting.rs
+1
-1
src/librustc_typeck/check/_match.rs
src/librustc_typeck/check/_match.rs
+2
-2
src/librustc_typeck/check/cast.rs
src/librustc_typeck/check/cast.rs
+4
-4
src/librustdoc/clean/blanket_impl.rs
src/librustdoc/clean/blanket_impl.rs
+1
-1
未找到文件。
src/librustc/middle/dead.rs
浏览文件 @
08f3685a
...
...
@@ -236,7 +236,7 @@ fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
self
.handle_field_access
(
&
lhs
,
expr
.id
);
}
hir
::
ExprKind
::
Struct
(
_
,
ref
fields
,
_
)
=>
{
if
let
ty
::
TyKind
::
Adt
(
ref
adt
,
_
)
=
self
.tables
.expr_ty
(
expr
)
.sty
{
if
let
ty
::
Adt
(
ref
adt
,
_
)
=
self
.tables
.expr_ty
(
expr
)
.sty
{
self
.mark_as_used_if_union
(
adt
,
fields
);
}
}
...
...
src/librustc/traits/error_reporting.rs
浏览文件 @
08f3685a
...
...
@@ -802,7 +802,7 @@ pub fn report_selection_error(&self,
let
expected
=
match
expected_trait_ref
.skip_binder
()
.substs
.type_at
(
1
)
.sty
{
ty
::
Tuple
(
ref
tys
)
=>
tys
.iter
()
.map
(|
t
|
match
t
.sty
{
ty
::
T
yKind
::
T
uple
(
ref
tys
)
=>
ArgKind
::
Tuple
(
ty
::
Tuple
(
ref
tys
)
=>
ArgKind
::
Tuple
(
Some
(
span
),
tys
.iter
()
.map
(|
ty
|
(
"_"
.to_owned
(),
ty
.sty
.to_string
()))
...
...
@@ -899,7 +899,7 @@ fn suggest_remove_reference(&self,
let
mut
trait_type
=
trait_ref
.self_ty
();
for
refs_remaining
in
0
..
refs_number
{
if
let
ty
::
TyKind
::
Ref
(
_
,
t_type
,
_
)
=
trait_type
.sty
{
if
let
ty
::
Ref
(
_
,
t_type
,
_
)
=
trait_type
.sty
{
trait_type
=
t_type
;
let
substs
=
self
.tcx
.mk_substs_trait
(
trait_type
,
&
[]);
...
...
src/librustc/ty/util.rs
浏览文件 @
08f3685a
...
...
@@ -503,7 +503,7 @@ pub fn destructor_constraints(self, def: &'tcx ty::AdtDef)
!
impl_generics
.region_param
(
ebr
,
self
)
.pure_wrt_drop
}
UnpackedKind
::
Type
(
&
ty
::
TyS
{
sty
:
ty
::
TyKind
::
Param
(
ref
pt
),
..
sty
:
ty
::
Param
(
ref
pt
),
..
})
=>
{
!
impl_generics
.type_param
(
pt
,
self
)
.pure_wrt_drop
}
...
...
src/librustc_borrowck/borrowck/mod.rs
浏览文件 @
08f3685a
...
...
@@ -697,7 +697,7 @@ pub fn report_use_of_moved_value(&self,
Some
(
nl
.to_string
()),
Origin
::
Ast
);
let
need_note
=
match
lp
.ty.sty
{
ty
::
TyKind
::
Closure
(
id
,
_
)
=>
{
ty
::
Closure
(
id
,
_
)
=>
{
let
node_id
=
self
.tcx.hir
.as_local_node_id
(
id
)
.unwrap
();
let
hir_id
=
self
.tcx.hir
.node_to_hir_id
(
node_id
);
if
let
Some
((
span
,
name
))
=
self
.tables
.closure_kind_origins
()
.get
(
hir_id
)
{
...
...
src/librustc_mir/borrow_check/error_reporting.rs
浏览文件 @
08f3685a
...
...
@@ -134,7 +134,7 @@ pub(super) fn report_use_of_moved_or_uninitialized(
if
let
Some
(
ty
)
=
self
.retrieve_type_for_place
(
place
)
{
let
needs_note
=
match
ty
.sty
{
ty
::
TyKind
::
Closure
(
id
,
_
)
=>
{
ty
::
Closure
(
id
,
_
)
=>
{
let
tables
=
self
.tcx
.typeck_tables_of
(
id
);
let
node_id
=
self
.tcx.hir
.as_local_node_id
(
id
)
.unwrap
();
let
hir_id
=
self
.tcx.hir
.node_to_hir_id
(
node_id
);
...
...
src/librustc_typeck/check/_match.rs
浏览文件 @
08f3685a
...
...
@@ -53,7 +53,7 @@ pub fn check_pat_walk(
PatKind
::
Lit
(
ref
lt
)
=>
{
let
ty
=
self
.check_expr
(
lt
);
match
ty
.sty
{
ty
::
TyKind
::
Ref
(
..
)
=>
false
,
ty
::
Ref
(
..
)
=>
false
,
_
=>
true
,
}
}
...
...
@@ -84,7 +84,7 @@ pub fn check_pat_walk(
expected
=
loop
{
debug!
(
"inspecting {:?} with type {:?}"
,
exp_ty
,
exp_ty
.sty
);
match
exp_ty
.sty
{
ty
::
TyKind
::
Ref
(
_
,
inner_ty
,
inner_mutability
)
=>
{
ty
::
Ref
(
_
,
inner_ty
,
inner_mutability
)
=>
{
debug!
(
"current discriminant is Ref, inserting implicit deref"
);
// Preserve the reference type. We'll need it later during HAIR lowering.
pat_adjustments
.push
(
exp_ty
);
...
...
src/librustc_typeck/check/cast.rs
浏览文件 @
08f3685a
...
...
@@ -477,12 +477,12 @@ fn do_check(&self, fcx: &FnCtxt<'a, 'gcx, 'tcx>) -> Result<CastKind, CastError>
(
RPtr
(
p
),
Int
(
_
))
|
(
RPtr
(
p
),
Float
)
=>
{
match
p
.ty.sty
{
ty
::
TyKind
::
Int
(
_
)
|
ty
::
TyKind
::
Uint
(
_
)
|
ty
::
TyKind
::
Float
(
_
)
=>
{
ty
::
Int
(
_
)
|
ty
::
Uint
(
_
)
|
ty
::
Float
(
_
)
=>
{
Err
(
CastError
::
NeedDeref
)
}
ty
::
TyKind
::
Infer
(
t
)
=>
{
ty
::
Infer
(
t
)
=>
{
match
t
{
ty
::
InferTy
::
IntVar
(
_
)
|
ty
::
InferTy
::
FloatVar
(
_
)
=>
Err
(
CastError
::
NeedDeref
),
...
...
src/librustdoc/clean/blanket_impl.rs
浏览文件 @
08f3685a
...
...
@@ -83,7 +83,7 @@ pub fn get_blanket_impls<F>(
.expect
(
"Cannot get impl trait"
);
match
trait_ref
.self_ty
()
.sty
{
ty
::
Ty
Param
(
_
)
=>
{},
ty
::
Param
(
_
)
=>
{},
_
=>
return
,
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录