summaryrefslogtreecommitdiffstats
path: root/tests/ui/coherence/illegal-copy-bad-projection.rs
blob: 797443a0abe5a99db1a1a985a6d0190bd7b0b377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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() {}