Remove some as_slice calls.

This commit is contained in:
Ms2ger 2015-04-24 17:40:22 +02:00
parent 4ee89363fb
commit 6a55ae06d7
34 changed files with 79 additions and 79 deletions

View file

@ -32,10 +32,10 @@ impl LintPass for TransmutePass {
&& args.len() == 1 {
let tcx = cx.tcx;
cx.span_lint(TRANSMUTE_TYPE_LINT, ex.span,
format!("Transmute to {} from {} detected",
&format!("Transmute to {} from {} detected",
expr_ty(tcx, ex).repr(tcx),
expr_ty(tcx, &**args.get(0).unwrap()).repr(tcx)
).as_slice());
));
}
}
_ => {}

View file

@ -150,7 +150,7 @@ impl LintPass for UnrootedPass {
ty::ty_enum(did, _) => {
if ty::has_attr(cx.tcx, did, "must_root") {
cx.span_lint(UNROOTED_MUST_ROOT, expr.span,
format!("Expression of type {} must be rooted", t.repr(cx.tcx)).as_slice());
&format!("Expression of type {} must be rooted", t.repr(cx.tcx)));
}
}
_ => {}