Closed as not planned
Description
Since the context is closed before t.Cleanup is called this is almost always a mistake, and can usually be detected statically. It's an easy mistake to make, and on one occasion I wasted about an hour trying to find the root cause.
The minimum would be to detect a direct call to t.Context() in t.Cleanup. This could be improved by detecting usage of context.Context variable inside t.Cleanup which was ever assigned t.Context in the past. This should probably cover almost all such uses.