A common mistake is using int when a generic constraint should accept defined integer types. int admits only the int type; ~int admits every type whose underlying type is int. section 2.9.1
Why ~int matters
Define type customInt int and give it a String() string method. A constraint containing ~int and String() string accepts customInt because its underlying type is int; replacing ~int with int causes a compilation error. section 2.9.1
type customConstraint interface {
~int
String() string
}
This constraint combines an underlying-type approximation with a required method, making the distinction between int and ~int concrete. section 2.9.1

