about summary refs log tree commit diff
path: root/src/libcore/fmt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-30 13:43:24 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-11-01 11:37:04 -0700
commit21ac985af44f4e2470ef6f4c0eb4d72daf5a6497 (patch)
treea120c184188926cd154b40f9da77ad8a6a455c1b /src/libcore/fmt
parent1442235d3feab4c5ca3f55e2b3345583f640a17e (diff)
downloadrust-21ac985af44f4e2470ef6f4c0eb4d72daf5a6497.tar.gz
rust-21ac985af44f4e2470ef6f4c0eb4d72daf5a6497.zip
collections: Remove all collections traits
As part of the collections reform RFC, this commit removes all collections
traits in favor of inherent methods on collections themselves. All methods
should continue to be available on all collections.

This is a breaking change with all of the collections traits being removed and
no longer being in the prelude. In order to update old code you should move the
trait implementations to inherent implementations directly on the type itself.

Note that some traits had default methods which will also need to be implemented
to maintain backwards compatibility.

[breaking-change]
cc #18424
Diffstat (limited to 'src/libcore/fmt')
-rw-r--r--src/libcore/fmt/float.rs4
-rw-r--r--src/libcore/fmt/mod.rs1
-rw-r--r--src/libcore/fmt/num.rs3
3 files changed, 2 insertions, 6 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index b8a91a912ba..f51d3948757 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -11,14 +11,12 @@
 #![allow(missing_docs)]
 
 use char;
-use collections::Collection;
 use fmt;
 use iter::{range, DoubleEndedIterator};
 use num::{Float, FPNaN, FPInfinite, ToPrimitive, Primitive};
 use num::{Zero, One, cast};
 use result::Ok;
-use slice::MutableSlice;
-use slice;
+use slice::{mod, ImmutableSlice, MutableSlice};
 use str::StrSlice;
 
 /// A flag that specifies whether to use exponential (scientific) notation.
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 5000b020985..74b39a7058c 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -14,7 +14,6 @@
 
 use any;
 use cell::{Cell, Ref, RefMut};
-use collections::Collection;
 use iter::{Iterator, range};
 use kinds::{Copy, Sized};
 use mem;
diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs
index 568528f6ae2..190e1ecea59 100644
--- a/src/libcore/fmt/num.rs
+++ b/src/libcore/fmt/num.rs
@@ -14,11 +14,10 @@
 
 #![allow(unsigned_negation)]
 
-use collections::Collection;
 use fmt;
 use iter::DoubleEndedIterator;
 use num::{Int, cast, zero};
-use slice::{MutableSlice};
+use slice::{ImmutableSlice, MutableSlice};
 
 /// A type that represents a specific radix
 #[doc(hidden)]