Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
ac6f2f0d
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
ac6f2f0d
编写于
8月 01, 2023
作者:
M
Michael Goulet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a comment
上级
44be25d8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
13 deletion
+6
-13
compiler/rustc_hir_analysis/src/astconv/mod.rs
compiler/rustc_hir_analysis/src/astconv/mod.rs
+1
-1
compiler/rustc_hir_typeck/src/closure.rs
compiler/rustc_hir_typeck/src/closure.rs
+1
-1
compiler/rustc_middle/src/ty/adt.rs
compiler/rustc_middle/src/ty/adt.rs
+2
-10
compiler/rustc_ty_utils/src/ty.rs
compiler/rustc_ty_utils/src/ty.rs
+2
-1
未找到文件。
compiler/rustc_hir_analysis/src/astconv/mod.rs
浏览文件 @
ac6f2f0d
...
...
@@ -1462,7 +1462,7 @@ pub fn associated_path_to_ty(
let
traits
:
Vec
<
_
>
=
self
.probe_traits_that_match_assoc_ty
(
qself_ty
,
assoc_ident
);
// Don't print `
TyEr
r` to the user.
// Don't print `
ty::Erro
r` to the user.
self
.report_ambiguous_associated_type
(
span
,
&
[
qself_ty
.to_string
()],
...
...
compiler/rustc_hir_typeck/src/closure.rs
浏览文件 @
ac6f2f0d
...
...
@@ -795,7 +795,7 @@ fn deduce_future_output_from_projection(
/// Converts the types that the user supplied, in case that doing
/// so should yield an error, but returns back a signature where
/// all parameters are of type `
TyEr
r`.
/// all parameters are of type `
ty::Erro
r`.
fn
error_sig_of_closure
(
&
self
,
decl
:
&
hir
::
FnDecl
<
'_
>
,
...
...
compiler/rustc_middle/src/ty/adt.rs
浏览文件 @
ac6f2f0d
...
...
@@ -562,16 +562,8 @@ pub fn destructor(self, tcx: TyCtxt<'tcx>) -> Option<Destructor> {
tcx
.adt_destructor
(
self
.did
())
}
/// Returns a list of types such that `Self: Sized` if and only
/// if that type is `Sized`, or `TyErr` if this type is recursive.
///
/// Oddly enough, checking that the sized-constraint is `Sized` is
/// actually more expressive than checking all members:
/// the `Sized` trait is inductive, so an associated type that references
/// `Self` would prevent its containing ADT from being `Sized`.
///
/// Due to normalization being eager, this applies even if
/// the associated type is behind a pointer (e.g., issue #31299).
/// Returns a list of types such that `Self: Sized` if and only if that
/// type is `Sized`, or `ty::Error` if this type has a recursive layout.
pub
fn
sized_constraint
(
self
,
tcx
:
TyCtxt
<
'tcx
>
)
->
ty
::
EarlyBinder
<&
'tcx
ty
::
List
<
Ty
<
'tcx
>>>
{
tcx
.adt_sized_constraint
(
self
.did
())
}
...
...
compiler/rustc_ty_utils/src/ty.rs
浏览文件 @
ac6f2f0d
...
...
@@ -62,7 +62,8 @@ fn sized_constraint_for_ty<'tcx>(
let
predicates
=
tcx
.predicates_of
(
adtdef
.did
())
.predicates
;
if
predicates
.iter
()
.any
(|(
p
,
_
)|
{
p
.as_trait_clause
()
.is_some_and
(|
trait_pred
|
{
trait_pred
.def_id
()
==
sized_trait_def_id
&&
trait_pred
.self_ty
()
.skip_binder
()
==
ty
trait_pred
.def_id
()
==
sized_trait_def_id
&&
trait_pred
.self_ty
()
.skip_binder
()
==
ty
})
})
{
vec!
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录