diff options
| author | Ariel Ben-Yehuda <arielb1@mail.tau.ac.il> | 2015-05-14 15:04:49 +0300 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2015-05-19 17:42:14 +0300 |
| commit | 32fe2e3ad452128d17ab1ce15f2c77b8cb42a3ea (patch) | |
| tree | bca08ed0c097aa5c2e0c1f3b91a873f3e3366be1 /src/test/compile-fail/destructure-trait-ref.rs | |
| parent | de4b0e996192d6784e0a65c66d095a6198894c47 (diff) | |
| download | rust-32fe2e3ad452128d17ab1ce15f2c77b8cb42a3ea.tar.gz rust-32fe2e3ad452128d17ab1ce15f2c77b8cb42a3ea.zip | |
Address review commets
I think I didn't run tests properly - my second call to select_all_obligations_or_error has made 3 tests fail. However, this is just an error message change - integer fallback never worked with casts.
Diffstat (limited to 'src/test/compile-fail/destructure-trait-ref.rs')
| -rw-r--r-- | src/test/compile-fail/destructure-trait-ref.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs index 3f455e148a0..08db643df00 100644 --- a/src/test/compile-fail/destructure-trait-ref.rs +++ b/src/test/compile-fail/destructure-trait-ref.rs @@ -28,29 +28,29 @@ fn main() { // if n > m, it's a type mismatch error. // n < m - let &x = &(&1 as &T); - let &x = &&(&1 as &T); - let &&x = &&(&1 as &T); + let &x = &(&1isize as &T); + let &x = &&(&1isize as &T); + let &&x = &&(&1isize as &T); // n == m - let &x = &1 as &T; //~ ERROR type `&T` cannot be dereferenced - let &&x = &(&1 as &T); //~ ERROR type `&T` cannot be dereferenced - let box x = box 1 as Box<T>; //~ ERROR the trait `core::marker::Sized` is not implemented + let &x = &1isize as &T; //~ ERROR type `&T` cannot be dereferenced + let &&x = &(&1isize as &T); //~ ERROR type `&T` cannot be dereferenced + let box x = box 1isize as Box<T>; //~ ERROR the trait `core::marker::Sized` is not implemented // n > m - let &&x = &1 as &T; + let &&x = &1isize as &T; //~^ ERROR mismatched types //~| expected `T` //~| found `&_` //~| expected trait T //~| found &-ptr - let &&&x = &(&1 as &T); + let &&&x = &(&1isize as &T); //~^ ERROR mismatched types //~| expected `T` //~| found `&_` //~| expected trait T //~| found &-ptr - let box box x = box 1 as Box<T>; + let box box x = box 1isize as Box<T>; //~^ ERROR mismatched types //~| expected `T` //~| found `Box<_>` |
