[docs] Note that types and modules share the same namespace
This commit is contained in:
parent
0afe002757
commit
47faeb9228
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user