mirror of
https://github.com/servo/servo.git
synced 2025-07-30 10:40:27 +01:00
Upgrade plugins
This commit is contained in:
parent
9fbffff604
commit
3cdc412a4c
4 changed files with 9 additions and 7 deletions
|
@ -34,12 +34,12 @@ impl LintPass for StrToStringPass {
|
|||
fn is_str(cx: &Context, expr: &ast::Expr) -> bool {
|
||||
fn walk_ty<'t>(ty: ty::Ty<'t>) -> ty::Ty<'t> {
|
||||
match ty.sty {
|
||||
ty::ty_ptr(ref tm) | ty::ty_rptr(_, ref tm) => walk_ty(tm.ty),
|
||||
ty::TyRef(_, ref tm) | ty::TyRawPtr(ref tm) => walk_ty(tm.ty),
|
||||
_ => ty
|
||||
}
|
||||
}
|
||||
match walk_ty(expr_ty(cx.tcx, expr)).sty {
|
||||
ty::ty_str => true,
|
||||
ty::TyStr => true,
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue