☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
rust
/
compile
/
unsafe8.rs
☽
☼
gcc/testsuite/rust/compile/unsafe8.rs
code
plain
raw
1
struct S;
2
3
impl S {
4
unsafe fn foo(self) {}
5
}
6
7
fn main() {
8
let s = S;
9
s.foo(); // { dg-error "call to unsafe method" }
10
11
unsafe {
12
s.foo();
13
}
14
}