Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
cb29c468
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
cb29c468
编写于
2月 18, 2015
作者:
A
Alex Crichton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix from niko for cfail tests
上级
b8d35ded
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
12 deletion
+21
-12
src/librustc_typeck/check/implicator.rs
src/librustc_typeck/check/implicator.rs
+8
-0
src/test/compile-fail/regions-assoc-type-in-supertrait-outlives-container.rs
...il/regions-assoc-type-in-supertrait-outlives-container.rs
+3
-3
src/test/compile-fail/regions-assoc-type-outlives-container-hrtb.rs
...ompile-fail/regions-assoc-type-outlives-container-hrtb.rs
+3
-3
src/test/compile-fail/regions-assoc-type-outlives-container-wc.rs
.../compile-fail/regions-assoc-type-outlives-container-wc.rs
+3
-3
src/test/compile-fail/regions-assoc-type-outlives-container.rs
...est/compile-fail/regions-assoc-type-outlives-container.rs
+4
-3
未找到文件。
src/librustc_typeck/check/implicator.rs
浏览文件 @
cb29c468
...
...
@@ -329,6 +329,9 @@ fn accumulate_from_adt(&mut self,
fn
accumulate_from_assoc_types_transitive
(
&
mut
self
,
data
:
&
ty
::
PolyTraitPredicate
<
'tcx
>
)
{
debug!
(
"accumulate_from_assoc_types_transitive({})"
,
data
.repr
(
self
.tcx
()));
for
poly_trait_ref
in
traits
::
supertraits
(
self
.tcx
(),
data
.to_poly_trait_ref
())
{
match
ty
::
no_late_bound_regions
(
self
.tcx
(),
&
poly_trait_ref
)
{
Some
(
trait_ref
)
=>
{
self
.accumulate_from_assoc_types
(
trait_ref
);
}
...
...
@@ -340,6 +343,9 @@ fn accumulate_from_assoc_types_transitive(&mut self,
fn
accumulate_from_assoc_types
(
&
mut
self
,
trait_ref
:
Rc
<
ty
::
TraitRef
<
'tcx
>>
)
{
debug!
(
"accumulate_from_assoc_types({})"
,
trait_ref
.repr
(
self
.tcx
()));
let
trait_def_id
=
trait_ref
.def_id
;
let
trait_def
=
ty
::
lookup_trait_def
(
self
.tcx
(),
trait_def_id
);
let
assoc_type_projections
:
Vec
<
_
>
=
...
...
@@ -347,6 +353,8 @@ fn accumulate_from_assoc_types(&mut self,
.iter
()
.map
(|
&
name
|
ty
::
mk_projection
(
self
.tcx
(),
trait_ref
.clone
(),
name
))
.collect
();
debug!
(
"accumulate_from_assoc_types: assoc_type_projections={}"
,
assoc_type_projections
.repr
(
self
.tcx
()));
let
tys
=
match
self
.fully_normalize
(
&
assoc_type_projections
)
{
Ok
(
tys
)
=>
{
tys
}
Err
(
ErrorReported
)
=>
{
return
;
}
...
...
src/test/compile-fail/regions-assoc-type-in-supertrait-outlives-container.rs
浏览文件 @
cb29c468
...
...
@@ -15,12 +15,12 @@
#![allow(dead_code)]
use
std
::
marker
::
PhantomFn
;
///////////////////////////////////////////////////////////////////////////
pub
trait
TheTrait
{
pub
trait
TheTrait
:
PhantomFn
<
Self
,
Self
>
{
type
TheAssocType
;
fn
dummy
(
&
self
)
{
}
}
pub
trait
TheSubTrait
:
TheTrait
{
...
...
src/test/compile-fail/regions-assoc-type-outlives-container-hrtb.rs
浏览文件 @
cb29c468
...
...
@@ -14,12 +14,12 @@
#![allow(dead_code)]
#![feature(rustc_attrs)]
use
std
::
marker
::
PhantomFn
;
///////////////////////////////////////////////////////////////////////////
pub
trait
TheTrait
<
'b
>
{
pub
trait
TheTrait
<
'b
>
:
PhantomFn
<
Self
,
Self
>
{
type
TheAssocType
;
fn
dummy
(
&
'b
self
)
{
}
}
pub
struct
TheType
<
'b
>
{
...
...
src/test/compile-fail/regions-assoc-type-outlives-container-wc.rs
浏览文件 @
cb29c468
...
...
@@ -15,12 +15,12 @@
#![allow(dead_code)]
use
std
::
marker
::
PhantomFn
;
///////////////////////////////////////////////////////////////////////////
pub
trait
TheTrait
{
pub
trait
TheTrait
:
PhantomFn
<
Self
,
Self
>
{
type
TheAssocType
;
fn
dummy
(
&
self
)
{
}
}
pub
struct
TheType
<
'b
>
{
...
...
src/test/compile-fail/regions-assoc-type-outlives-container.rs
浏览文件 @
cb29c468
...
...
@@ -13,13 +13,14 @@
// outlive the location in which the type appears. Issue #22246.
#![allow(dead_code)]
#![feature(rustc_attrs)]
use
std
::
marker
::
PhantomFn
;
///////////////////////////////////////////////////////////////////////////
pub
trait
TheTrait
{
pub
trait
TheTrait
:
PhantomFn
<
Self
,
Self
>
{
type
TheAssocType
;
fn
dummy
(
&
self
)
{
}
}
pub
struct
TheType
<
'b
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录