mirror of
https://github.com/servo/servo.git
synced 2025-07-29 02:00:23 +01:00
Remove some as_slice calls.
This commit is contained in:
parent
4ee89363fb
commit
6a55ae06d7
34 changed files with 79 additions and 79 deletions
|
@ -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());
|
||||
));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue