Skip to content

Commit

Permalink
Patch up broken error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 21, 2014
1 parent 646ec7d commit b066d09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libcore/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-17636.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-2149.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

5 comments on commit b066d09

@bors
Copy link
Contributor

@bors bors commented on b066d09 Oct 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at nikomatsakis@b066d09

@bors
Copy link
Contributor

@bors bors commented on b066d09 Oct 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging nikomatsakis/rust/method-call-use-trait-matching-infrastructure-2 = b066d09 into auto

@bors
Copy link
Contributor

@bors bors commented on b066d09 Oct 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nikomatsakis/rust/method-call-use-trait-matching-infrastructure-2 = b066d09 merged ok, testing candidate = 3d2cf60

@bors
Copy link
Contributor

@bors bors commented on b066d09 Oct 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on b066d09 Oct 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 3d2cf60

Please sign in to comment.