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/libcollections/string.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libcollections/string.rs') diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 05d91a75041..a12d403603f 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -872,7 +872,7 @@ mod tests { use {Mutable, MutableSeq}; use str; - use str::{Str, StrSlice, Owned, Slice}; + use str::{Str, StrSlice, Owned}; use super::String; use vec::Vec; @@ -898,10 +898,10 @@ mod tests { #[test] fn test_from_utf8_lossy() { let xs = b"hello"; - assert_eq!(String::from_utf8_lossy(xs), Slice("hello")); + assert_eq!(String::from_utf8_lossy(xs), str::Slice("hello")); let xs = "ศไทย中华Việt Nam".as_bytes(); - assert_eq!(String::from_utf8_lossy(xs), Slice("ศไทย中华Việt Nam")); + assert_eq!(String::from_utf8_lossy(xs), str::Slice("ศไทย中华Việt Nam")); let xs = b"Hello\xC2 There\xFF Goodbye"; assert_eq!(String::from_utf8_lossy(xs), -- cgit 1.4.1-3-g733a5