提交 cb29c468 编写于 作者: A Alex Crichton

Fix from niko for cfail tests

上级 b8d35ded
......@@ -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; }
......
......@@ -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 {
......
......@@ -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> {
......
......@@ -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> {
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册