diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-03-30 04:56:24 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-03-30 09:05:59 -0400 |
| commit | e2b2a53d704899e5e59c943ab39fa692125233be (patch) | |
| tree | 6b0ba0d42e2ab739c2369d3c572ae0c9c64a7e27 /src/test/auxiliary | |
| parent | c92bdcb232da3973a8a548e6b2044b610e286210 (diff) | |
| download | rust-e2b2a53d704899e5e59c943ab39fa692125233be.tar.gz rust-e2b2a53d704899e5e59c943ab39fa692125233be.zip | |
Fallout in tests: largely changes to error messages.
Diffstat (limited to 'src/test/auxiliary')
| -rw-r--r-- | src/test/auxiliary/lang-item-public.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/test/auxiliary/lang-item-public.rs b/src/test/auxiliary/lang-item-public.rs index 3c416dc2ef8..72dfc75f41b 100644 --- a/src/test/auxiliary/lang-item-public.rs +++ b/src/test/auxiliary/lang-item-public.rs @@ -35,18 +35,19 @@ pub trait Copy : PhantomFn<Self> { #[lang="rem"] pub trait Rem<RHS=Self> { - /// The resulting type after applying the `%` operator - #[stable(feature = "rust1", since = "1.0.0")] type Output = Self; - - /// The method for the `%` operator - #[stable(feature = "rust1", since = "1.0.0")] fn rem(self, rhs: RHS) -> Self::Output; } -impl Rem for i32 { - type Output = i32; +impl Rem for isize { + type Output = isize; #[inline] - fn rem(self, other: i32) -> i32 { self % other } + fn rem(self, other: isize) -> isize { + // if you use `self % other` here, as one would expect, you + // get back an error because of potential failure/overflow, + // which tries to invoke error fns that don't have the + // appropriate signatures anymore. So...just return 0. + 0 + } } |
