diff --git a/src/librustc_typeck/coherence/overlap.rs b/src/librustc_typeck/coherence/overlap.rs index 366e934b4ddc..a6ecafb62413 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 585e7cedc477..737d20676848 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, - ¶m.bounds[], + ¶m.bounds, SizedByDefault::Yes, param.span); let predicates = ty::predicates(ccx.tcx, param_ty, &bounds);