Patch up broken error messages

This commit is contained in:
Niko Matsakis 2014-10-21 17:36:15 -04:00
parent 646ec7d9a9
commit b066d09be8
3 changed files with 3 additions and 2 deletions

View file

@ -638,7 +638,7 @@ shr_impl!(uint u8 u16 u32 u64 int i8 i16 i32 i64)
* ```
*/
#[lang="index"]
pub trait Index<Index, Result> {
pub trait Index<Index, Sized? Result> {
/// The method for the indexing (`Foo[Bar]`) operation
fn index<'a>(&'a self, index: &Index) -> &'a Result;
}

View file

@ -15,5 +15,5 @@ pub fn build_archive<'a, I: MyItem<&'a (|&uint|:'a)>>(files: I) {}
fn main() {
build_archive(&(|_| { }));
//~^ ERROR unable to infer enough type information to locate the impl of the trait `MyItem<&|&uint|
//~^ ERROR not implemented
}

View file

@ -18,6 +18,7 @@ impl<A> vec_monad<A> for Vec<A> {
let mut r = fail!();
for elt in self.iter() { r = r + f(*elt); }
//~^ ERROR the type of this value must be known
//~^^ ERROR not implemented
}
}
fn main() {