2018-09-06 07:41:12 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2018-09-06 07:41:12 -05:00
|
|
|
|
2016-02-23 00:46:45 -06:00
|
|
|
#![feature(specialization)]
|
|
|
|
|
|
|
|
// Regression test for ICE when combining specialized associated types and type
|
|
|
|
// aliases
|
|
|
|
|
|
|
|
trait Id_ {
|
|
|
|
type Out;
|
|
|
|
}
|
|
|
|
|
|
|
|
type Id<T> = <T as Id_>::Out;
|
|
|
|
|
|
|
|
impl<T> Id_ for T {
|
|
|
|
default type Out = T;
|
|
|
|
}
|
|
|
|
|
2016-03-11 14:15:28 -06:00
|
|
|
fn test_proection() {
|
2016-02-23 00:46:45 -06:00
|
|
|
let x: Id<bool> = panic!();
|
|
|
|
}
|
2016-03-11 14:15:28 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
}
|