#![feature(extern_types)]
extern "C" {
type A;
fn foo() -> Box<A>;
fn bar();
}
impl A {
fn bar(&self) {
unsafe {bar()};
}
}
fn main() {
let a = unsafe { foo() } ;
a.bar();
}
This code compiles fine in rustc, but rust-analyzer gives Box<{unknown}> inlay hint to a.