From ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Thu, 11 Sep 2014 17:07:49 +1200 Subject: 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. --- src/test/compile-fail/recursion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/compile-fail/recursion.rs') diff --git a/src/test/compile-fail/recursion.rs b/src/test/compile-fail/recursion.rs index 96676257184..c99ec5187b0 100644 --- a/src/test/compile-fail/recursion.rs +++ b/src/test/compile-fail/recursion.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -enum Nil {Nil} +enum Nil {NilValue} struct Cons {head:int, tail:T} trait Dot {fn dot(&self, other:Self) -> int;} impl Dot for Nil { @@ -29,6 +29,6 @@ fn test (n:int, i:int, first:T, second:T) ->int { } } pub fn main() { - let n = test(1, 0, Nil, Nil); + let n = test(1, 0, NilValue, NilValue); println!("{}", n); } -- cgit 1.4.1-3-g733a5