]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/no-unsafe-self.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / parser / no-unsafe-self.rs
1 trait A {
2     fn foo(*mut self); //~ ERROR cannot pass `self` by raw pointer
3     fn baz(*const self); //~ ERROR cannot pass `self` by raw pointer
4     fn bar(*self); //~ ERROR cannot pass `self` by raw pointer
5 }
6
7 struct X;
8 impl A for X {
9     fn foo(*mut self) { } //~ ERROR cannot pass `self` by raw pointer
10     fn baz(*const self) { } //~ ERROR cannot pass `self` by raw pointer
11     fn bar(*self) { } //~ ERROR cannot pass `self` by raw pointer
12 }
13
14 fn main() { }