Skip to content

Commit d9bdc43

Browse files
committed
Fix up build warnings about use of []
1 parent 4db0b32 commit d9bdc43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/middle/astconv_util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub fn ast_ty_to_prim_ty<'tcx>(tcx: &ty::ctxt<'tcx>, ast_ty: &ast::Ty)
6868
Some(d) => d.full_def()
6969
};
7070
if let def::DefPrimTy(nty) = def {
71-
Some(prim_ty_to_ty(tcx, &path.segments[], nty))
71+
Some(prim_ty_to_ty(tcx, &path.segments[..], nty))
7272
} else {
7373
None
7474
}

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
29852985
} else {
29862986
let msg = format!("use of undeclared trait name `{}`",
29872987
self.path_names_to_string(trait_path, path_depth));
2988-
self.resolve_error(trait_path.span, &msg[]);
2988+
self.resolve_error(trait_path.span, &msg[..]);
29892989
Err(())
29902990
}
29912991
}

0 commit comments

Comments
 (0)