Skip to content

Commit b8d6a81

Browse files
committed
Rollup merge of rust-lang#22824 - bossmc:build-warnings, r=alexcrichton
Simple PR to fix some build warnings on a clean clone of master. ``` /home/ubuntu/src/rust/src/librustc/middle/astconv_util.rs:71:51: 71:53 warning: obsolete syntax: [] /home/ubuntu/src/rust/src/librustc/middle/astconv_util.rs:71 Some(prim_ty_to_ty(tcx, &path.segments[], nty)) ^~ note: write `[..]` instead ... /home/ubuntu/src/rust/src/librustc_resolve/lib.rs:2988:53: 2988:55 warning: obsolete syntax: [] /home/ubuntu/src/rust/src/librustc_resolve/lib.rs:2988 self.resolve_error(trait_path.span, &msg[]); ^~ note: write `[..]` instead ```
2 parents 66ced05 + d9bdc43 commit b8d6a81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/middle/astconv_util.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)