[docs] Note that types and modules share the same namespace

This commit is contained in:
Tim Chevalier 2012-12-14 15:42:20 -08:00
parent 0afe002757
commit 47faeb9228

View File

@ -752,6 +752,10 @@ mod math {
}
~~~~~~~~
Modules and types share the same namespace.
Declaring a named type that has the same name as a module in scope is forbidden:
that is, a type definition, trait, struct, enumeration, or type parameter
can't shadow the name of a module in scope, or vice versa.
#### View items