Comments, minor refactoring, clean up wording of error messages
This commit is contained in:
parent
2e0c1dbd4f
commit
e656261ee7
5 changed files with 33 additions and 21 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue