Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
d77dcbc5
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,发现更多精彩内容 >>
提交
d77dcbc5
编写于
8月 20, 2021
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
Auto merge of #87686 - matthiaskrgr:clippy_august_21_perf, r=jackh726
clippy::perf fixes
上级
52173478
a953574d
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
compiler/rustc_mir/src/transform/coverage/debug.rs
compiler/rustc_mir/src/transform/coverage/debug.rs
+2
-2
compiler/rustc_typeck/src/check/method/prelude2021.rs
compiler/rustc_typeck/src/check/method/prelude2021.rs
+1
-1
compiler/rustc_typeck/src/coherence/inherent_impls_overlap.rs
...iler/rustc_typeck/src/coherence/inherent_impls_overlap.rs
+4
-4
未找到文件。
compiler/rustc_mir/src/transform/coverage/debug.rs
浏览文件 @
d77dcbc5
...
...
@@ -369,10 +369,10 @@ fn format_operand(&self, operand: ExpressionOperandId) -> String {
}
return
format!
(
"({})"
,
self
.format_counter_kind
(
counter_kind
));
}
return
self
.format_counter_kind
(
counter_kind
)
.to_string
()
;
return
self
.format_counter_kind
(
counter_kind
);
}
}
format!
(
"#{}"
,
operand
.index
()
.to_string
()
)
format!
(
"#{}"
,
operand
.index
())
}
}
...
...
compiler/rustc_typeck/src/check/method/prelude2021.rs
浏览文件 @
d77dcbc5
...
...
@@ -265,7 +265,7 @@ pub(super) fn lint_fully_qualified_call_from_2018(
// Get the number of generics the self type has (if an Adt) unless we can determine that
// the user has written the self type with generics already which we (naively) do by looking
// for a "<" in `self_ty_name`.
Adt
(
def
,
_
)
if
!
self_ty_name
.contains
(
"<"
)
=>
self
.tcx
.generics_of
(
def
.did
)
.count
(),
Adt
(
def
,
_
)
if
!
self_ty_name
.contains
(
'<'
)
=>
self
.tcx
.generics_of
(
def
.did
)
.count
(),
_
=>
0
,
};
let
self_ty_generics
=
if
self_ty_generics_count
>
0
{
...
...
compiler/rustc_typeck/src/coherence/inherent_impls_overlap.rs
浏览文件 @
d77dcbc5
...
...
@@ -222,8 +222,8 @@ struct ConnectedRegion {
let
id_to_set
=
*
ids
.iter
()
.min
()
.unwrap
();
// Sort the id list so that the algorithm is deterministic
let
mut
ids
=
ids
.into_iter
()
.collect
::
<
SmallVec
<
[
_
;
8
]
>>
();
ids
.sort
();
let
mut
ids
=
ids
.into_iter
()
.collect
::
<
SmallVec
<
[
usize
;
8
]
>>
();
ids
.sort
_unstable
();
let
mut
region
=
connected_regions
.remove
(
&
id_to_set
)
.unwrap
();
region
.idents
.extend_from_slice
(
&
idents_to_add
);
...
...
@@ -266,8 +266,8 @@ struct ConnectedRegion {
// for each pair of impl blocks in the same connected region.
for
(
_
id
,
region
)
in
connected_regions
.into_iter
()
{
let
mut
impl_blocks
=
region
.impl_blocks
.into_iter
()
.collect
::
<
SmallVec
<
[
_
;
8
]
>>
();
impl_blocks
.sort
();
region
.impl_blocks
.into_iter
()
.collect
::
<
SmallVec
<
[
usize
;
8
]
>>
();
impl_blocks
.sort
_unstable
();
for
(
i
,
&
impl1_items_idx
)
in
impl_blocks
.iter
()
.enumerate
()
{
let
&
(
&
impl1_def_id
,
impl_items1
)
=
&
impls_items
[
impl1_items_idx
];
for
&
impl2_items_idx
in
impl_blocks
[(
i
+
1
)
..
]
.iter
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录