diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-08-07 09:27:27 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-08-12 17:58:56 -0400 |
| commit | 91b3e9cac0125e35d65169fb7e06166a078296c7 (patch) | |
| tree | 9d4ee7d97b5ffeec38060a1afa9a386cb08f233d /src/libcore | |
| parent | 788a802dad3f273b74150b732d24d37a695d29f6 (diff) | |
| download | rust-91b3e9cac0125e35d65169fb7e06166a078296c7.tar.gz rust-91b3e9cac0125e35d65169fb7e06166a078296c7.zip | |
Fallout in libs -- misc missing bounds uncovered by WF checks.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter.rs | 2 | ||||
| -rw-r--r-- | src/libcore/marker.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 3382095b456..d19f3b6d27a 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -2623,7 +2623,7 @@ impl<A, St, F> Iterator for Unfold<St, F> where F: FnMut(&mut St) -> Option<A> { /// two `Step` objects. #[unstable(feature = "step_trait", reason = "likely to be replaced by finer-grained traits")] -pub trait Step: PartialOrd { +pub trait Step: PartialOrd+Sized { /// Steps `self` if possible. fn step(&self, by: &Self) -> Option<Self>; diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index c0956753c98..32f367e12f0 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -56,7 +56,7 @@ pub trait Sized { /// Types that can be "unsized" to a dynamically sized type. #[unstable(feature = "unsize")] #[lang="unsize"] -pub trait Unsize<T> { +pub trait Unsize<T: ?Sized> { // Empty. } diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index ad891bf8fa6..7507e5782d6 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -19,7 +19,7 @@ use char::CharExt; use cmp::{Eq, PartialOrd}; use fmt; use intrinsics; -use marker::Copy; +use marker::{Copy, Sized}; use mem::size_of; use option::Option::{self, Some, None}; use result::Result::{self, Ok, Err}; @@ -1264,7 +1264,7 @@ pub enum FpCategory { #[doc(hidden)] #[unstable(feature = "core_float", reason = "stable interface is via `impl f{32,64}` in later crates")] -pub trait Float { +pub trait Float: Sized { /// Returns the NaN value. fn nan() -> Self; /// Returns the infinite value. diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 3c9338c2cd2..d5bceb3ba62 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -25,6 +25,7 @@ use default::Default; use fmt; use iter::ExactSizeIterator; use iter::{Map, Iterator, DoubleEndedIterator}; +use marker::Sized; use mem; use ops::{Fn, FnMut, FnOnce}; use option::Option::{self, None, Some}; @@ -37,7 +38,7 @@ pub mod pattern; /// A trait to abstract the idea of creating a new instance of a type from a /// string. #[stable(feature = "rust1", since = "1.0.0")] -pub trait FromStr { +pub trait FromStr: Sized { /// The associated error which can be returned from parsing. #[stable(feature = "rust1", since = "1.0.0")] type Err; |
