Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
b076f034
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,发现更多精彩内容 >>
提交
b076f034
编写于
10月 20, 2022
作者:
L
lcnr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rustc_hir_typeck: fix clippy
上级
fb3ab13a
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
17 addition
and
18 deletion
+17
-18
src/tools/clippy/clippy_lints/src/escape.rs
src/tools/clippy/clippy_lints/src/escape.rs
+2
-2
src/tools/clippy/clippy_lints/src/lib.rs
src/tools/clippy/clippy_lints/src/lib.rs
+1
-0
src/tools/clippy/clippy_lints/src/loops/mut_range_bound.rs
src/tools/clippy/clippy_lints/src/loops/mut_range_bound.rs
+2
-2
src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
...s/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
+1
-1
src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
+2
-2
src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs
...ls/clippy/clippy_lints/src/operators/assign_op_pattern.rs
+1
-1
src/tools/clippy/clippy_lints/src/transmute/utils.rs
src/tools/clippy/clippy_lints/src/transmute/utils.rs
+1
-1
src/tools/clippy/clippy_utils/src/lib.rs
src/tools/clippy/clippy_utils/src/lib.rs
+1
-1
src/tools/clippy/clippy_utils/src/sugg.rs
src/tools/clippy/clippy_utils/src/sugg.rs
+3
-4
src/tools/clippy/clippy_utils/src/usage.rs
src/tools/clippy/clippy_utils/src/usage.rs
+3
-4
未找到文件。
src/tools/clippy/clippy_lints/src/escape.rs
浏览文件 @
b076f034
use
clippy_utils
::
diagnostics
::
span_lint_hir
;
use
rustc_hir
::
intravisit
;
use
rustc_hir
::{
self
,
AssocItemKind
,
Body
,
FnDecl
,
HirId
,
HirIdSet
,
Impl
,
ItemKind
,
Node
,
Pat
,
PatKind
};
use
rustc_hir_
analysis
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_hir_
typeck
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_infer
::
infer
::
TyCtxtInferExt
;
use
rustc_lint
::{
LateContext
,
LateLintPass
};
use
rustc_middle
::
mir
::
FakeReadCause
;
...
...
@@ -178,7 +178,7 @@ fn mutate(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) {
fn
fake_read
(
&
mut
self
,
_
:
&
rustc_hir_
analysis
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
&
rustc_hir_
typeck
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
FakeReadCause
,
_
:
HirId
,
)
{
...
...
src/tools/clippy/clippy_lints/src/lib.rs
浏览文件 @
b076f034
...
...
@@ -32,6 +32,7 @@
extern
crate
rustc_errors
;
extern
crate
rustc_hir
;
extern
crate
rustc_hir_analysis
;
extern
crate
rustc_hir_typeck
;
extern
crate
rustc_hir_pretty
;
extern
crate
rustc_index
;
extern
crate
rustc_infer
;
...
...
src/tools/clippy/clippy_lints/src/loops/mut_range_bound.rs
浏览文件 @
b076f034
...
...
@@ -4,7 +4,7 @@
use
if_chain
::
if_chain
;
use
rustc_hir
::
intravisit
::{
self
,
Visitor
};
use
rustc_hir
::{
BindingAnnotation
,
Expr
,
ExprKind
,
HirId
,
Node
,
PatKind
};
use
rustc_hir_
analysis
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_hir_
typeck
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_infer
::
infer
::
TyCtxtInferExt
;
use
rustc_lint
::
LateContext
;
use
rustc_middle
::{
mir
::
FakeReadCause
,
ty
};
...
...
@@ -115,7 +115,7 @@ fn mutate(&mut self, cmt: &PlaceWithHirId<'tcx>, diag_expr_id: HirId) {
fn
fake_read
(
&
mut
self
,
_
:
&
rustc_hir_
analysis
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
&
rustc_hir_
typeck
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
FakeReadCause
,
_
:
HirId
,
)
{
...
...
src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
浏览文件 @
b076f034
...
...
@@ -8,7 +8,7 @@
use
clippy_utils
::{
meets_msrv
,
msrvs
};
use
rustc_errors
::
Applicability
;
use
rustc_hir
::{
def_id
::
DefId
,
BorrowKind
,
Expr
,
ExprKind
,
ItemKind
,
LangItem
,
Node
};
use
rustc_hir_
analysis
::
ch
eck
::{
FnCtxt
,
Inherited
};
use
rustc_hir_
typ
eck
::{
FnCtxt
,
Inherited
};
use
rustc_infer
::
infer
::
TyCtxtInferExt
;
use
rustc_lint
::
LateContext
;
use
rustc_middle
::
mir
::
Mutability
;
...
...
src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
浏览文件 @
b076f034
...
...
@@ -12,7 +12,7 @@
BindingAnnotation
,
Body
,
FnDecl
,
GenericArg
,
HirId
,
Impl
,
ItemKind
,
Mutability
,
Node
,
PatKind
,
QPath
,
TyKind
,
};
use
rustc_hir
::{
HirIdMap
,
HirIdSet
};
use
rustc_hir_
analysis
::
expr_use_visitor
as
euv
;
use
rustc_hir_
typeck
::
expr_use_visitor
as
euv
;
use
rustc_infer
::
infer
::
TyCtxtInferExt
;
use
rustc_lint
::{
LateContext
,
LateLintPass
};
use
rustc_middle
::
mir
::
FakeReadCause
;
...
...
@@ -342,7 +342,7 @@ fn mutate(&mut self, _: &euv::PlaceWithHirId<'tcx>, _: HirId) {}
fn
fake_read
(
&
mut
self
,
_
:
&
rustc_hir_
analysis
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
&
rustc_hir_
typeck
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
FakeReadCause
,
_
:
HirId
,
)
{
...
...
src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs
浏览文件 @
b076f034
...
...
@@ -8,7 +8,7 @@
use
if_chain
::
if_chain
;
use
rustc_errors
::
Applicability
;
use
rustc_hir
as
hir
;
use
rustc_hir_
analysis
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_hir_
typeck
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_lint
::
LateContext
;
use
rustc_middle
::
mir
::
FakeReadCause
;
use
rustc_middle
::
ty
::
BorrowKind
;
...
...
src/tools/clippy/clippy_lints/src/transmute/utils.rs
浏览文件 @
b076f034
use
rustc_hir
::
Expr
;
use
rustc_hir_
analysis
::
ch
eck
::{
cast
,
FnCtxt
,
Inherited
};
use
rustc_hir_
typ
eck
::{
cast
,
FnCtxt
,
Inherited
};
use
rustc_lint
::
LateContext
;
use
rustc_middle
::
ty
::{
cast
::
CastKind
,
Ty
};
use
rustc_span
::
DUMMY_SP
;
...
...
src/tools/clippy/clippy_utils/src/lib.rs
浏览文件 @
b076f034
...
...
@@ -24,7 +24,7 @@
extern
crate
rustc_data_structures
;
extern
crate
rustc_errors
;
extern
crate
rustc_hir
;
extern
crate
rustc_hir_
analysis
;
extern
crate
rustc_hir_
typeck
;
extern
crate
rustc_infer
;
extern
crate
rustc_lexer
;
extern
crate
rustc_lint
;
...
...
src/tools/clippy/clippy_utils/src/sugg.rs
浏览文件 @
b076f034
...
...
@@ -10,7 +10,7 @@
use
rustc_errors
::
Applicability
;
use
rustc_hir
as
hir
;
use
rustc_hir
::{
Closure
,
ExprKind
,
HirId
,
MutTy
,
TyKind
};
use
rustc_hir_
analysis
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_hir_
typeck
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_infer
::
infer
::
TyCtxtInferExt
;
use
rustc_lint
::{
EarlyContext
,
LateContext
,
LintContext
};
use
rustc_middle
::
hir
::
place
::
ProjectionKind
;
...
...
@@ -1054,11 +1054,10 @@ fn mutate(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {}
fn
fake_read
(
&
mut
self
,
_
:
&
rustc_hir_
analysis
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
&
rustc_hir_
typeck
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
FakeReadCause
,
_
:
HirId
,
)
{
}
)
{}
}
#[cfg(test)]
...
...
src/tools/clippy/clippy_utils/src/usage.rs
浏览文件 @
b076f034
...
...
@@ -5,7 +5,7 @@
use
rustc_hir
::
intravisit
::{
self
,
Visitor
};
use
rustc_hir
::
HirIdSet
;
use
rustc_hir
::{
Expr
,
ExprKind
,
HirId
,
Node
};
use
rustc_hir_
analysis
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_hir_
typeck
::
expr_use_visitor
::{
Delegate
,
ExprUseVisitor
,
PlaceBase
,
PlaceWithHirId
};
use
rustc_infer
::
infer
::
TyCtxtInferExt
;
use
rustc_lint
::
LateContext
;
use
rustc_middle
::
hir
::
nested_filter
;
...
...
@@ -75,11 +75,10 @@ fn mutate(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) {
fn
fake_read
(
&
mut
self
,
_
:
&
rustc_hir_
analysis
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
&
rustc_hir_
typeck
::
expr_use_visitor
::
PlaceWithHirId
<
'tcx
>
,
_
:
FakeReadCause
,
_
:
HirId
,
)
{
}
)
{}
}
pub
struct
ParamBindingIdCollector
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录