mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-15 05:04:23 +00:00
18 lines
239 B
Rust
18 lines
239 B
Rust
//@ run-pass
|
|
//@ compile-flags:-Zmir-opt-level=3
|
|
|
|
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>();
|
|
}
|