about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/noise.rs2
-rw-r--r--src/test/compile-fail/slice-1.rs20
-rw-r--r--src/test/run-pass/issue-15149.rs2
3 files changed, 2 insertions, 22 deletions
diff --git a/src/test/bench/noise.rs b/src/test/bench/noise.rs
index 6cd75836187..42051e33e2e 100644
--- a/src/test/bench/noise.rs
+++ b/src/test/bench/noise.rs
@@ -47,7 +47,7 @@ impl Noise2DContext {
         let mut rng = StdRng::new().unwrap();
 
         let mut rgradients = [Vec2 { x: 0.0, y: 0.0 }; 256];
-        for x in &mut rgradients[] {
+        for x in &mut rgradients[..] {
             *x = random_gradient(&mut rng);
         }
 
diff --git a/src/test/compile-fail/slice-1.rs b/src/test/compile-fail/slice-1.rs
deleted file mode 100644
index 3b992e3bcc3..00000000000
--- a/src/test/compile-fail/slice-1.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test slicing &expr[] is deprecated and gives a helpful error message.
-
-struct Foo;
-
-fn main() {
-    let x = Foo;
-    &x[];
-    //~^ WARN obsolete syntax
-    //~| ERROR cannot index
-}
diff --git a/src/test/run-pass/issue-15149.rs b/src/test/run-pass/issue-15149.rs
index 0e194860251..ee348d9cb0c 100644
--- a/src/test/run-pass/issue-15149.rs
+++ b/src/test/run-pass/issue-15149.rs
@@ -28,7 +28,7 @@ fn main() {
         // checking that it ends_with the executable name. This
         // is needed because of Windows, which has a different behavior.
         // See #15149 for more info.
-        return assert!(args[0].ends_with(&format!("mytest{}", env::consts::EXE_SUFFIX)[]));
+        return assert!(args[0].ends_with(&format!("mytest{}", env::consts::EXE_SUFFIX)));
     }
 
     test();