The constructors may predate RFCs? I think I've only seen passing reference to them in the documentation, e.g. under Tuple Struct Expression, so I'm afraid I don't know where this is further officially addressed.
Edit: Oh, and in case it helps clarify -- there is a separate namespace for values (like functions) and types, which is how the constructor and type can coexist.
error[E0532]: expected tuple struct or tuple variant, found function `f`
--> src/main.rs:5:9
|
5 | let f(x) = 9.0;
| ^ not a tuple struct or tuple variant
Interestingly, it doesn't fail to compile because it doesn't make sense. It does make sense, and the solution is x = 3.0. The problem is that the compiler cannot automatically compute the inverse of a function. (I believe it still an open question of whether there exist functions that have no inverses, but regardless, it is not computationally feasible to do this.) But if we could magically compute function inverses, there'd be no reason to not allow this kind of code.
In the meantime, the compiler has special builtin functions that it does understand how to invert: struct and tuple constructors. Because they are builtins with fixed, trivial semantics, they are allowed in patterns like this. (And because struct constructors have special syntax, you don't use function call syntax in patterns either, but this Fblah { x } syntax instead. Though there's no fundamental reason structs can't use function call syntax, as they already do for user-defined constructors.)
In other words, pattern matching is just algebra, and data constructors are just functions whose inverses are known to the compiler.
That's right, I was actually thinking about one-way functions. It's not really important to the overall idea though, which is that we can't compute the inverses of arbitrary functions.