See change in:
https://github.com/rescript-lang/rescript/pull/7057/files#r1941028210
The following code does not typecheck:
module X = {
type t = int
let n : t => t = x => x+1
}
let z : X.t = 3
Outside the module, the fact that type X.t is the same as int is lost. This happens only with the unused binding to n.
Presumably the type environment is left in some inconsistent state, or something.