blob: 5315e21b0f5a9ea2545d15d5e3550374b75c59f4 [file] [log] [blame]
#![feature(rustc_attrs)]
// revisions: good bad
trait Mirror {
type Image;
}
impl<T> Mirror for T {
type Image = T;
}
#[cfg(bad)]
fn foo<U, T>(_t: T)
where for<'a> &'a T: Mirror<Image=U>
{}
#[cfg(good)]
fn foo<U, T>(_t: T)
where for<'a> &'a T: Mirror<Image=&'a U>
{}
#[rustc_error]
fn main() { //[good]~ ERROR fatal error triggered by #[rustc_error]
foo(());
//[bad]~^ ERROR type mismatch
}