Fix error: obsolete syntax: `~[T]` is no longer a type