diff options
Diffstat (limited to 'src/test/compile-fail/issue-7575.rs')
| -rw-r--r-- | src/test/compile-fail/issue-7575.rs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/test/compile-fail/issue-7575.rs b/src/test/compile-fail/issue-7575.rs index d5a1040d4b4..0d5156956e5 100644 --- a/src/test/compile-fail/issue-7575.rs +++ b/src/test/compile-fail/issue-7575.rs @@ -11,43 +11,43 @@ // Test the mechanism for warning about possible missing `self` declarations. trait CtxtFn { - fn f8(self, uint) -> uint; - fn f9(uint) -> uint; //~ NOTE candidate + fn f8(self, usize) -> usize; + fn f9(usize) -> usize; //~ NOTE candidate } trait OtherTrait { - fn f9(uint) -> uint; //~ NOTE candidate + fn f9(usize) -> usize; //~ NOTE candidate } // Note: this trait is not implemented, but we can't really tell // whether or not an impl would match anyhow without a self -// declaration to match against, so we wind up printing it as a +// declaration to match against, so we wind up prisizeing it as a // candidate. This seems not unreasonable -- perhaps the user meant to // implement it, after all. trait UnusedTrait { - fn f9(uint) -> uint; //~ NOTE candidate + fn f9(usize) -> usize; //~ NOTE candidate } -impl CtxtFn for uint { - fn f8(self, i: uint) -> uint { +impl CtxtFn for usize { + fn f8(self, i: usize) -> usize { i * 4u } - fn f9(i: uint) -> uint { + fn f9(i: usize) -> usize { i * 4u } } -impl OtherTrait for uint { - fn f9(i: uint) -> uint { +impl OtherTrait for usize { + fn f9(i: usize) -> usize { i * 8u } } -struct MyInt(int); +struct Myisize(isize); -impl MyInt { - fn fff(i: int) -> int { //~ NOTE candidate +impl Myisize { + fn fff(i: isize) -> isize { //~ NOTE candidate i } } @@ -64,17 +64,17 @@ impl ManyImplTrait for String { } } -impl ManyImplTrait for uint {} -impl ManyImplTrait for int {} +impl ManyImplTrait for usize {} +impl ManyImplTrait for isize {} impl ManyImplTrait for char {} -impl ManyImplTrait for MyInt {} +impl ManyImplTrait for Myisize {} -fn no_param_bound(u: uint, m: MyInt) -> uint { +fn no_param_bound(u: usize, m: Myisize) -> usize { u.f8(42) + u.f9(342) + m.fff(42) - //~^ ERROR type `uint` does not implement any method in scope named `f9` + //~^ ERROR type `usize` does not implement any method in scope named `f9` //~^^ NOTE found defined static methods, maybe a `self` is missing? - //~^^^ ERROR type `MyInt` does not implement any method in scope named `fff` - //~^^^^ NOTE found defined static methods, maybe a `self` is missing? + //~^^^ ERROR type `Myisize` does not implement any method in scope named `fff` + //~^^^^ NOTE found defined static methods, maybe a `self` is missing? } fn param_bound<T: ManyImplTrait>(t: T) -> bool { |
