about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-arbitrary-self-types-pointers.rs
blob: 7ea1b875f79a4fa5fa4f667538d2ee385f27d95d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ revisions: default feature
#![cfg_attr(feature, feature(arbitrary_self_types))]

trait Foo {
    fn foo(self: *const Self); //~ ERROR `*const Self` cannot be used as the type of `self`
}

struct Bar;

impl Foo for Bar {
    fn foo(self: *const Self) {} //~ ERROR `*const Bar` cannot be used as the type of `self`
}

impl Bar {
    fn bar(self: *mut Self) {} //~ ERROR `*mut Bar` cannot be used as the type of `self`
}

fn main() {}