2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2021-03-04 07:35:11 -06:00
|
|
|
// compile-flags:-Zmir-opt-level=3
|
2017-11-05 07:57:53 -06: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>();
|
|
|
|
}
|