Comments, minor refactoring, clean up wording of error messages

This commit is contained in:
Lindsey Kuper 2012-08-07 09:45:32 -07:00
parent 2e0c1dbd4f
commit e656261ee7
5 changed files with 33 additions and 21 deletions

View file

@ -1,4 +1,4 @@
// error-pattern:Call to private method not allowed
// error-pattern:call to private method not allowed
class cat {
priv {
let mut meows : uint;

View file

@ -3,7 +3,7 @@ trait add {
}
fn do_add(x: add, y: add) -> add {
x.plus(y) //~ ERROR can not call a method that contains a self type through a boxed trait
x.plus(y) //~ ERROR cannot call a method whose type contains a self-type through a boxed trait
}
fn main() {}

View file

@ -5,5 +5,5 @@ impl of bar for uint { fn dup() -> uint { self } fn blah<X>() {} }
fn main() {
10.dup::<int>(); //~ ERROR does not take type parameters
10.blah::<int, int>(); //~ ERROR incorrect number of type parameters
(10 as bar).dup(); //~ ERROR contains a self type
(10 as bar).dup(); //~ ERROR contains a self-type
}