mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
16 lines
274 B
Rust
16 lines
274 B
Rust
trait AsPtr {
|
|
type Ptr;
|
|
}
|
|
|
|
impl AsPtr for () {
|
|
type Ptr = *const void;
|
|
//~^ ERROR cannot find type `void` in this scope
|
|
}
|
|
|
|
#[derive(Copy, Clone)]
|
|
struct Foo {
|
|
p: <() as AsPtr>::Ptr,
|
|
// Do not report a "`Copy` cannot be implemented" here.
|
|
}
|
|
|
|
fn main() {}
|