The GatherLocalsVisitor is responsible for initializing local variable types
in the ty::TypeckResults for all subpatterns in statements and expressions
like let, match, and params of function bodies. It also adds Sized bounds
for these types (with exceptions for unsized feature gates like unsized_fn_params).
Provides context for checking patterns in declarations. More specifically this
allows us to infer array types if the pattern is irrefutable and allows us to infer
the size of the array. See issue #76342.