Since you need to re-borrow this later to calculate the lint level, it might be simpler just to save the lint level here.

```rust
let size_lint = ccx.tcx.node_lint_levels.borrow().find(&(id, lint::VariantSizeDifference)).map_or(lint::allow, |&(lvl,_)| lvl);
```

Then you can just replace the `if care_about_size` test later with `if size_lint != lint::allow`.