summary refs log tree commit diff
path: root/src/test/ui/parser/no-unsafe-self.rs
blob: 57201f2d91afd6e77806d411de8b1790d5aadcc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// compile-flags: -Z continue-parse-after-error

trait A {
    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
}

struct X;
impl A for X {
    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
}

fn main() { }