How about

```rust
match self.tcx... {
    Some(ast::DefStatic(_, true)) => true,
    _  => false
}
```
?