aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/unsafe-infects-caller.rs
blob: 532024e59d0675b399b569c319fe566d57d2ae17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// xfail-stage0
// error-pattern: calculated effect is 'unsafe'

native mod foo {
  fn naughty();
}

unsafe fn bar() {
  foo.naughty();
}

fn main() {
  bar();
}