What is `~` used for?
I found ~ being used in option.rs:779. I came across some old rust code using ~ for pointers, but I never saw it being used this way. This is not from some old version of rust core lib, it's current version.
Here is code example from source code:
pub const fn unwrap_or(self, default: T) -> T
where
T: ~const Drop + ~const Destruct,
{
match self {
Some(x) => x,
None => default,
}
}