To reproduce
- Add the following to VSCode's
settings.json:
"[Default Dark+]": { // or whatever theme you use
"rules": {
"operator.unsafe": "#f00",
"function.unsafe": "#f00",
}
}
- Open the following program:
unsafe fn u() {}
extern "system" {
fn e();
}
pub fn f() {
unsafe {
u();
e();
}
}
Expected result
Function names in both invocations should be red.
Reference:
A function declared in an extern block is implicitly unsafe.
Actual result
u is red, but e is not:

rust-analyzer version: 2020-06-08 (d696776)