Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
525e23ad
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,发现更多精彩内容 >>
提交
525e23ad
编写于
1月 08, 2021
作者:
S
SNCPlay42
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
peel derives when checking normalized is expected
上级
770a9cf7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
40 addition
and
9 deletion
+40
-9
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
...r/rustc_trait_selection/src/traits/error_reporting/mod.rs
+1
-1
src/test/ui/associated-types/issue-44153.stderr
src/test/ui/associated-types/issue-44153.stderr
+1
-1
src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
...ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
+20
-0
src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr
...mpl-trait/projection-mismatch-in-impl-where-clause.stderr
+11
-0
src/test/ui/issues/issue-33941.stderr
src/test/ui/issues/issue-33941.stderr
+6
-6
src/test/ui/issues/issue-39970.stderr
src/test/ui/issues/issue-39970.stderr
+1
-1
未找到文件。
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
浏览文件 @
525e23ad
...
...
@@ -1190,7 +1190,7 @@ fn report_projection_error(
);
let
is_normalized_ty_expected
=
!
matches!
(
obligation
.cause.code
,
obligation
.cause.code
.peel_derives
()
,
ObligationCauseCode
::
ItemObligation
(
_
)
|
ObligationCauseCode
::
BindingObligation
(
_
,
_
)
|
ObligationCauseCode
::
ObjectCastObligation
(
_
)
...
...
src/test/ui/associated-types/issue-44153.stderr
浏览文件 @
525e23ad
...
...
@@ -5,7 +5,7 @@ LL | fn visit() {}
| ---------- required by `Visit::visit`
...
LL | <() as Visit>::visit();
| ^^^^^^^^^^^^^^^^^^^^ expected `
()`, found `&
()`
| ^^^^^^^^^^^^^^^^^^^^ expected `
&()`, found `
()`
|
= note: required because of the requirements on the impl of `Visit` for `()`
...
...
src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
0 → 100644
浏览文件 @
525e23ad
pub
trait
Super
{
type
Assoc
;
}
impl
Super
for
()
{
type
Assoc
=
u8
;
}
pub
trait
Test
{}
impl
<
T
>
Test
for
T
where
T
:
Super
<
Assoc
=
()
>
{}
fn
test
()
->
impl
Test
{
//~^ERROR type mismatch resolving `<() as Super>::Assoc == ()`
()
}
fn
main
()
{
let
a
=
test
();
}
src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.stderr
0 → 100644
浏览文件 @
525e23ad
error[E0271]: type mismatch resolving `<() as Super>::Assoc == ()`
--> $DIR/projection-mismatch-in-impl-where-clause.rs:13:14
|
LL | fn test() -> impl Test {
| ^^^^^^^^^ expected `()`, found `u8`
|
= note: required because of the requirements on the impl of `Test` for `()`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0271`.
src/test/ui/issues/issue-33941.stderr
浏览文件 @
525e23ad
...
...
@@ -11,10 +11,10 @@ error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _,
--> $DIR/issue-33941.rs:4:14
|
LL | for _ in HashMap::new().iter().cloned() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
tuple, found referenc
e
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
reference, found tupl
e
|
= note:
expected tuple `(&_, &_)
`
found reference `&_
`
= note:
expected reference `&_
`
found tuple `(&_, &_)
`
= note: required because of the requirements on the impl of `Iterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
= note: required because of the requirements on the impl of `IntoIterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
= note: required by `into_iter`
...
...
@@ -23,10 +23,10 @@ error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _,
--> $DIR/issue-33941.rs:4:14
|
LL | for _ in HashMap::new().iter().cloned() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
tuple, found referenc
e
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected
reference, found tupl
e
|
= note:
expected tuple `(&_, &_)
`
found reference `&_
`
= note:
expected reference `&_
`
found tuple `(&_, &_)
`
= note: required because of the requirements on the impl of `Iterator` for `Cloned<std::collections::hash_map::Iter<'_, _, _>>`
= note: required by `std::iter::Iterator::next`
...
...
src/test/ui/issues/issue-39970.stderr
浏览文件 @
525e23ad
...
...
@@ -5,7 +5,7 @@ LL | fn visit() {}
| ---------- required by `Visit::visit`
...
LL | <() as Visit>::visit();
| ^^^^^^^^^^^^^^^^^^^^ expected `
&()`, found `
()`
| ^^^^^^^^^^^^^^^^^^^^ expected `
()`, found `&
()`
|
= note: required because of the requirements on the impl of `Visit` for `()`
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录