I don't buy it, it's too cryptic from my point of view. You can easily create a simple function that does everything you want in one line and is far more readable, so -1 for me.
func change<T>(_ value: inout T, from oldValue: T, to newValue: T) {
precondition(value == oldValue)
value = newValue
}
// usage
change(x, from: a, to: b)
I agree with @DevAndArtist that this probably doesn't rise to the level of needing an operator. There's a widely-used term of art for this operation: "compare-and-swap". I would expect expect any library implementation to use a variant of that name.
(I would also expect it to not have a precondition, but return either Bool or Optional<T> indicating whether the check succeeded--and the new value in the case of an Optional--which the caller could then handle by a fatalError if they really want the precondition behavior or more likely do something else.)
The -> operator as defined above would encourage you to use this sort of assignment more frequently as it would have minimal impact on the readability of your code.