kind::check_expr just doesn't have a case for structs, so you can write:
B { foo: x }
if x has type ~T and B is a struct with a ~T field foo.
This wasn't showing up before because last-use was enabled and most values involved in initializing a struct are going to be last uses.
I have a fix, testing it.
kind::check_exprjust doesn't have a case for structs, so you can write:B { foo: x }if
xhas type~TandBis a struct with a~Tfieldfoo.This wasn't showing up before because last-use was enabled and most values involved in initializing a struct are going to be last uses.
I have a fix, testing it.