Add enum variants to the type namespace

Change to resolve and update compiler and libs for uses.

[breaking-change]

Enum variants are now in both the value and type namespaces. This means that
if you have a variant with the same name as a type in scope in a module, you
will get a name clash and thus an error. The solution is to either rename the
type or the variant.
This commit is contained in:
Nick Cameron
2014-09-11 17:07:49 +12:00
parent af3889f697
commit ce0907e46e
72 changed files with 489 additions and 457 deletions

View File

@@ -305,11 +305,11 @@ pub enum SyntaxExtension {
/// based upon it.
///
/// `#[deriving(...)]` is an `ItemDecorator`.
ItemDecorator(Box<ItemDecorator + 'static>),
Decorator(Box<ItemDecorator + 'static>),
/// A syntax extension that is attached to an item and modifies it
/// in-place.
ItemModifier(Box<ItemModifier + 'static>),
Modifier(Box<ItemModifier + 'static>),
/// A normal, function-like syntax extension.
///
@@ -387,7 +387,7 @@ fn initial_syntax_expander_table() -> SyntaxEnv {
builtin_normal_expander(
ext::log_syntax::expand_syntax_ext));
syntax_expanders.insert(intern("deriving"),
ItemDecorator(box ext::deriving::expand_meta_deriving));
Decorator(box ext::deriving::expand_meta_deriving));
// Quasi-quoting expanders
syntax_expanders.insert(intern("quote_tokens"),