mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
17 lines
274 B
Rust
17 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() {}
|