Closed
Description
#6308 needs to walk all variable binding sites, look up the type of the variable, and ensure that it has the Sized
kind. But ty::node_id_to_type
doesn't work on the pat_ident
's node id when the pattern is a function argument.
Other analyses should be able to look up the types of function arguments (...or be able to look up the types of match bindings without special-casing some situations away...) this way too.
I verified this by open-coding the function visitor code in kind::check_fn
and deleting the calls to visit_pat
, and the rest of the kind::check_pat
cases worked fine.
cc @pcwalton