2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
|
|
|
|
//@ compile-flags:-Zmir-opt-level=3
|
2017-11-05 22:57:53 +09:00
|
|
|
|
|
|
|
|
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>();
|
|
|
|
|
}
|