2013-08-23 00:15:09 +00:00
|
|
|
trait A {
|
2016-05-08 18:18:21 +00:00
|
|
|
fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer
|
|
|
|
fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer
|
|
|
|
fn bar(*self); //~ ERROR cannot pass `self` by raw pointer
|
2013-08-23 00:15:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct X;
|
|
|
|
impl A for X {
|
2016-05-08 18:18:21 +00:00
|
|
|
fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer
|
|
|
|
fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer
|
|
|
|
fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer
|
2013-08-23 00:15:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|