Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
545d8d67
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,发现更多精彩内容 >>
提交
545d8d67
编写于
9月 11, 2021
作者:
M
Matthias Krüger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
don't convert types into identical types
example: let x: String = String::new().into();
上级
22719efc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
5 deletion
+5
-5
compiler/rustc_hir_pretty/src/lib.rs
compiler/rustc_hir_pretty/src/lib.rs
+1
-1
compiler/rustc_infer/src/infer/error_reporting/mod.rs
compiler/rustc_infer/src/infer/error_reporting/mod.rs
+1
-1
compiler/rustc_passes/src/liveness.rs
compiler/rustc_passes/src/liveness.rs
+2
-2
compiler/rustc_passes/src/region.rs
compiler/rustc_passes/src/region.rs
+1
-1
未找到文件。
compiler/rustc_hir_pretty/src/lib.rs
浏览文件 @
545d8d67
...
...
@@ -1036,7 +1036,7 @@ pub fn print_stmt(&mut self, st: &hir::Stmt<'_>) {
self
.maybe_print_comment
(
st
.span
.lo
());
match
st
.kind
{
hir
::
StmtKind
::
Local
(
ref
loc
)
=>
{
self
.print_local
(
loc
.init
.as_deref
()
,
|
this
|
this
.print_local_decl
(
&
loc
));
self
.print_local
(
loc
.init
,
|
this
|
this
.print_local_decl
(
&
loc
));
}
hir
::
StmtKind
::
Item
(
item
)
=>
self
.ann
.nested
(
self
,
Nested
::
Item
(
item
)),
hir
::
StmtKind
::
Expr
(
ref
expr
)
=>
{
...
...
compiler/rustc_infer/src/infer/error_reporting/mod.rs
浏览文件 @
545d8d67
...
...
@@ -2345,7 +2345,7 @@ enum SubOrigin<'hir> {
);
err
.span_suggestion
(
generics
.where_clause
.tail_span_for_suggestion
(),
"consider adding a where clause"
.into
()
,
"consider adding a where clause"
,
suggestion
,
Applicability
::
MaybeIncorrect
,
);
...
...
compiler/rustc_passes/src/liveness.rs
浏览文件 @
545d8d67
...
...
@@ -775,7 +775,7 @@ fn propagate_through_block(&mut self, blk: &hir::Block<'_>, succ: LiveNode) -> L
if
blk
.targeted_by_break
{
self
.break_ln
.insert
(
blk
.hir_id
,
succ
);
}
let
succ
=
self
.propagate_through_opt_expr
(
blk
.expr
.as_deref
()
,
succ
);
let
succ
=
self
.propagate_through_opt_expr
(
blk
.expr
,
succ
);
blk
.stmts
.iter
()
.rev
()
.fold
(
succ
,
|
succ
,
stmt
|
self
.propagate_through_stmt
(
stmt
,
succ
))
}
...
...
@@ -796,7 +796,7 @@ fn propagate_through_stmt(&mut self, stmt: &hir::Stmt<'_>, succ: LiveNode) -> Li
// initialization, which is mildly more complex than checking
// once at the func header but otherwise equivalent.
let
succ
=
self
.propagate_through_opt_expr
(
local
.init
.as_deref
()
,
succ
);
let
succ
=
self
.propagate_through_opt_expr
(
local
.init
,
succ
);
self
.define_bindings_in_pat
(
&
local
.pat
,
succ
)
}
hir
::
StmtKind
::
Item
(
..
)
=>
succ
,
...
...
compiler/rustc_passes/src/region.rs
浏览文件 @
545d8d67
...
...
@@ -812,7 +812,7 @@ fn visit_expr(&mut self, ex: &'tcx Expr<'tcx>) {
resolve_expr
(
self
,
ex
);
}
fn
visit_local
(
&
mut
self
,
l
:
&
'tcx
Local
<
'tcx
>
)
{
resolve_local
(
self
,
Some
(
&
l
.pat
),
l
.init
.as_deref
()
);
resolve_local
(
self
,
Some
(
&
l
.pat
),
l
.init
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录