gcc/testsuite/rust/compile/self_const_ptr.rs
raw| 1 | struct MyStruct; |
| 2 | |
| 3 | impl MyStruct { |
| 4 | pub fn do_something(*const self) {} |
| 5 | // { dg-error "cannot pass .self. by raw pointer" "" { target *-*-* } .-1 } |
| 6 | // { dg-error "failed to parse inherent impl item in inherent impl" "" { target *-*-* } .-2 } |
| 7 | // { dg-error "failed to parse item in crate" "" { target *-*-* } .-3 } |
| 8 | } |