rust/tests/ui/specialization/specialization-projection-alias.rs

27 lines
416 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
#![allow(unused_variables)]
2020-05-17 03:22:48 -05:00
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// 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() {
let x: Id<bool> = panic!();
}
2016-03-11 14:15:28 -06:00
fn main() {
}