Using extern "C inside a function

As far as I know, using use inside a function doesn't have a performance impact. Is this also true when using extern "C"? Is this pattern "allowed"?

fn default() {
   #[link(name = "foo")]
   extern "C" {
      fn bar(x: i32);
   }
   bar(10);
}

Yes. But the snippet needs a small adjustment...

fn default() {
   #[link(name = "foo")]
   extern "C" {
      fn bar(x: i32);
   }
   unsafe { bar(10) };
}