diff options
Diffstat (limited to 'src/test/compile-fail/slice-2.rs')
| -rw-r--r-- | src/test/compile-fail/slice-2.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/compile-fail/slice-2.rs b/src/test/compile-fail/slice-2.rs index 24f710d2ae3..1e850d6307e 100644 --- a/src/test/compile-fail/slice-2.rs +++ b/src/test/compile-fail/slice-2.rs @@ -16,8 +16,8 @@ struct Foo; fn main() { let x = Foo; - x[]; //~ ERROR cannot take a slice of a value with type `Foo` - x[Foo..]; //~ ERROR cannot take a slice of a value with type `Foo` - x[..Foo]; //~ ERROR cannot take a slice of a value with type `Foo` - x[Foo..Foo]; //~ ERROR cannot take a slice of a value with type `Foo` + x.index(&FullRange); //~ ERROR cannot take a slice of a value with type `Foo` + x.index(&(Foo..)); //~ ERROR cannot take a slice of a value with type `Foo` + x.index(&(0..Foo)); //~ ERROR cannot take a slice of a value with type `Foo` + x.index(&(Foo..Foo)); //~ ERROR cannot take a slice of a value with type `Foo` } |
