]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/no-unsafe-self.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / 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() { }