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:
parent
af3889f697
commit
ce0907e46e
72 changed files with 489 additions and 457 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue