mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 13:18:59 +00:00
It has the same spirit as #3747 but with a much simpler approach. I've used the fact that @Boshen mentioned about linter always using CFG so now we assert `semantic.cfg().is_some()` in the `LintContext::new` because of this assertion we can have a `LintContext::cfg` that unwraps unchecked. Eliminates unnecessary checks in our hot paths. It has the best of both worlds, No complicated typing yet we still get the CFG as a non-optional value without extra ASM or branching. |
||
|---|---|---|
| .. | ||
| linter.rs | ||
| main.rs | ||