2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2017-11-05 07:57:53 -06:00
|
|
|
// compile-flags:-Zmir-opt-level=2
|
|
|
|
|
|
|
|
trait Array {
|
|
|
|
type Item;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo<A: Array>() {
|
|
|
|
let _: *mut A::Item = std::ptr::null_mut();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
impl Array for Foo { type Item = i32; }
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
foo::<Foo>();
|
|
|
|
}
|