mirror of https://github.com/rust-lang/rust
19 lines
392 B
Rust
19 lines
392 B
Rust
struct Foo;
|
|
|
|
impl Foo {
|
|
fn foo(self: *const Self) {}
|
|
//~^ ERROR `*const Foo` cannot be used as the type of `self` without
|
|
}
|
|
|
|
trait Bar {
|
|
fn bar(self: *const Self);
|
|
//~^ ERROR `*const Self` cannot be used as the type of `self` without
|
|
}
|
|
|
|
impl Bar for () {
|
|
fn bar(self: *const Self) {}
|
|
//~^ ERROR `*const ()` cannot be used as the type of `self` without
|
|
}
|
|
|
|
fn main() {}
|