Fallout in libs -- misc missing bounds uncovered by WF checks.
This commit is contained in:
parent
788a802dad
commit
91b3e9cac0
@ -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>;
|
||||
|
||||
|
@ -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.
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -561,7 +561,7 @@ pub type Edges<'a,E> = Cow<'a,[E]>;
|
||||
/// `Cow<[T]>` to leave implementers the freedom to create
|
||||
/// entirely new vectors or to pass back slices into internally owned
|
||||
/// vectors.
|
||||
pub trait GraphWalk<'a, N, E> {
|
||||
pub trait GraphWalk<'a, N: Clone, E: Clone> {
|
||||
/// Returns all the nodes in this graph.
|
||||
fn nodes(&'a self) -> Nodes<'a, N>;
|
||||
/// Returns all of the edges in this graph.
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
// this is surprisingly complicated to be both generic & correct
|
||||
|
||||
use core::marker::Sized;
|
||||
use Rng;
|
||||
use distributions::{Sample, IndependentSample};
|
||||
|
||||
@ -57,7 +58,7 @@ impl<Sup: SampleRange> IndependentSample<Sup> for Range<Sup> {
|
||||
/// uniformly between two values. This should not be used directly,
|
||||
/// and is only to facilitate `Range`.
|
||||
#[doc(hidden)]
|
||||
pub trait SampleRange {
|
||||
pub trait SampleRange: Sized {
|
||||
/// Construct the `Range` object that `sample_range`
|
||||
/// requires. This should not ever be called directly, only via
|
||||
/// `Range::new`, which will check that `low < high`, so this
|
||||
|
@ -1061,7 +1061,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
|
||||
}
|
||||
}
|
||||
|
||||
trait doc_decoder_helpers {
|
||||
trait doc_decoder_helpers: Sized {
|
||||
fn as_int(&self) -> isize;
|
||||
fn opt_child(&self, tag: c::astencode_tag) -> Option<Self>;
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ impl OverloadedCallType {
|
||||
// supplies types from the tree. After type checking is complete, you
|
||||
// can just use the tcx as the typer.
|
||||
|
||||
pub struct ExprUseVisitor<'d,'t,'a: 't, 'tcx:'a> {
|
||||
pub struct ExprUseVisitor<'d, 't, 'a: 't, 'tcx:'a+'d> {
|
||||
typer: &'t infer::InferCtxt<'a, 'tcx>,
|
||||
mc: mc::MemCategorizationContext<'t, 'a, 'tcx>,
|
||||
delegate: &'d mut (Delegate<'tcx>+'d),
|
||||
|
@ -272,7 +272,7 @@ impl<'tcx,K> UnificationTable<K>
|
||||
|
||||
impl<'tcx,K,V> UnificationTable<K>
|
||||
where K: UnifyKey<Value=Option<V>>,
|
||||
V: Clone+PartialEq,
|
||||
V: Clone+PartialEq+Debug,
|
||||
{
|
||||
pub fn unify_var_var(&mut self,
|
||||
a_id: K,
|
||||
|
@ -194,7 +194,7 @@ pub trait Encodable {
|
||||
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>;
|
||||
}
|
||||
|
||||
pub trait Decodable {
|
||||
pub trait Decodable: Sized {
|
||||
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
|
||||
}
|
||||
|
||||
|
@ -369,7 +369,7 @@ mod tests {
|
||||
use sync::{Arc, Mutex, StaticMutex, Condvar};
|
||||
use thread;
|
||||
|
||||
struct Packet<T: Send>(Arc<(Mutex<T>, Condvar)>);
|
||||
struct Packet<T>(Arc<(Mutex<T>, Condvar)>);
|
||||
|
||||
unsafe impl<T: Send> Send for Packet<T> {}
|
||||
unsafe impl<T> Sync for Packet<T> {}
|
||||
|
@ -60,7 +60,7 @@ pub use self::imp::Key as __KeyInner;
|
||||
/// });
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct LocalKey<T> {
|
||||
pub struct LocalKey<T:'static> {
|
||||
// The key itself may be tagged with #[thread_local], and this `Key` is
|
||||
// stored as a `static`, and it's not valid for a static to reference the
|
||||
// address of another thread_local static. For this reason we kinda wonkily
|
||||
|
@ -55,7 +55,7 @@ pub use self::imp::KeyInner as __KeyInner;
|
||||
#[unstable(feature = "scoped_tls",
|
||||
reason = "scoped TLS has yet to have wide enough use to fully consider \
|
||||
stabilizing its interface")]
|
||||
pub struct ScopedKey<T> { inner: fn() -> &'static imp::KeyInner<T> }
|
||||
pub struct ScopedKey<T:'static> { inner: fn() -> &'static imp::KeyInner<T> }
|
||||
|
||||
/// Declare a new scoped thread local storage key.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user