From 47faeb9228f10717de6879c6474cdcf988a9f316 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Fri, 14 Dec 2012 15:42:20 -0800 Subject: [PATCH] [docs] Note that types and modules share the same namespace --- doc/rust.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/rust.md b/doc/rust.md index 725314415f2..bfe6a2facfc 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -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