2013-08-22 19:15:09 -05:00
|
|
|
trait A {
|
2016-05-08 13:18:21 -05: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-22 19:15:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
struct X;
|
|
|
|
impl A for X {
|
2016-05-08 13:18:21 -05: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-22 19:15:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|