mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Resolve conflicts and extend the test
This commit is contained in:
parent
4dbb01ff65
commit
96d9408dd9
@ -113,7 +113,7 @@ use dep_graph::DepNode;
|
|||||||
use middle::def::*;
|
use middle::def::*;
|
||||||
use middle::pat_util;
|
use middle::pat_util;
|
||||||
use middle::ty::{self, TyCtxt, ParameterEnvironment};
|
use middle::ty::{self, TyCtxt, ParameterEnvironment};
|
||||||
use middle::traits;
|
use middle::traits::{self, ProjectionMode};
|
||||||
use middle::infer;
|
use middle::infer;
|
||||||
use lint;
|
use lint;
|
||||||
use util::nodemap::NodeMap;
|
use util::nodemap::NodeMap;
|
||||||
@ -1497,7 +1497,8 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
|||||||
let param_env = ParameterEnvironment::for_item(&self.ir.tcx, id);
|
let param_env = ParameterEnvironment::for_item(&self.ir.tcx, id);
|
||||||
let infcx = infer::new_infer_ctxt(&self.ir.tcx,
|
let infcx = infer::new_infer_ctxt(&self.ir.tcx,
|
||||||
&self.ir.tcx.tables,
|
&self.ir.tcx.tables,
|
||||||
Some(param_env));
|
Some(param_env),
|
||||||
|
ProjectionMode::Any);
|
||||||
let cause = traits::ObligationCause::dummy();
|
let cause = traits::ObligationCause::dummy();
|
||||||
let norm = traits::fully_normalize(&infcx,
|
let norm = traits::fully_normalize(&infcx,
|
||||||
cause,
|
cause,
|
||||||
|
@ -20,4 +20,18 @@ impl Make for () {
|
|||||||
fn make() -> Self::Out {}
|
fn make() -> Self::Out {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Also make sure we don't hit an ICE when the projection can't be known
|
||||||
|
fn f<T: Make>() -> <T as Make>::Out { loop {} }
|
||||||
|
|
||||||
|
// ...and that it works with a blanket impl
|
||||||
|
trait Tr {
|
||||||
|
type Assoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T: Make> Tr for T {
|
||||||
|
type Assoc = ();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn g<T: Make>() -> <T as Tr>::Assoc { }
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user