librustc: Remove outdated reference to `~` syntax

Fix #15052
Should this `match` also single out a `GcPtr`? Also, can you add tests for both these cases?