2018-09-06 14:41:12 +02:00
|
|
|
//@ run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2018-09-06 14:41:12 +02:00
|
|
|
|
2020-05-17 10:22:48 +02:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2016-02-22 22:46:45 -08:00
|
|
|
|
|
|
|
// 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 12:15:28 -08:00
|
|
|
fn test_proection() {
|
2016-02-22 22:46:45 -08:00
|
|
|
let x: Id<bool> = panic!();
|
|
|
|
}
|
2016-03-11 12:15:28 -08:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
}
|