about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-02-24 11:50:07 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-02-24 16:27:23 -0500
commitabdb42ba6402e5c16c10ec19643a4da1f855d653 (patch)
treeac8fd5aee304f419679d2d24d3708ef06a57bcdd
parenteb77fe9e06994b0a541680450c287b10452ba91a (diff)
downloadrust-abdb42ba6402e5c16c10ec19643a4da1f855d653.tar.gz
rust-abdb42ba6402e5c16c10ec19643a4da1f855d653.zip
Remove two uses of old `[]` notation
-rw-r--r--src/librustc_typeck/coherence/overlap.rs2
-rw-r--r--src/librustc_typeck/collect.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_typeck/coherence/overlap.rs b/src/librustc_typeck/coherence/overlap.rs
index 366e934b4dd..a6ecafb6241 100644
--- a/src/librustc_typeck/coherence/overlap.rs
+++ b/src/librustc_typeck/coherence/overlap.rs
@@ -147,7 +147,7 @@ impl<'cx, 'tcx,'v> visit::Visitor<'v> for OverlapChecker<'cx, 'tcx> {
                             None => {
                                 self.tcx.sess.bug(
                                           &format!("no default implementation recorded for `{:?}`",
-                                          item)[]);
+                                          item));
                             }
                         }
                     }
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 585e7cedc47..737d2067684 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -1720,7 +1720,7 @@ fn ty_generic_predicates<'a,'tcx>(ccx: &CrateCtxt<'a,'tcx>,
         let param_ty = ty::ParamTy::new(space, index, param.ident.name).to_ty(ccx.tcx);
         let bounds = compute_bounds(&ccx.icx(&(base_predicates, ast_generics)),
                                     param_ty,
-                                    &param.bounds[],
+                                    &param.bounds,
                                     SizedByDefault::Yes,
                                     param.span);
         let predicates = ty::predicates(ccx.tcx, param_ty, &bounds);