mirror of
https://github.com/servo/servo.git
synced 2025-07-29 18:20:24 +01:00
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
This commit is contained in:
parent
65d4b12bf2
commit
5f15eb5fbf
140 changed files with 1420 additions and 1222 deletions
|
@ -33,9 +33,9 @@ fn lint_unrooted_ty(cx: &Context, ty: &ast::Ty, warning: &str) {
|
|||
match ty.node {
|
||||
ast::TyVec(ref t) | ast::TyFixedLengthVec(ref t, _) |
|
||||
ast::TyPtr(ast::MutTy { ty: ref t, ..}) | ast::TyRptr(_, ast::MutTy { ty: ref t, ..}) => lint_unrooted_ty(cx, &**t, warning),
|
||||
ast::TyPath(_, id) => {
|
||||
match cx.tcx.def_map.borrow()[id].clone() {
|
||||
def::DefTy(def_id, _) => {
|
||||
ast::TyPath(..) => {
|
||||
match cx.tcx.def_map.borrow()[ty.id] {
|
||||
def::PathResolution{ base_def: def::DefTy(def_id, _), .. } => {
|
||||
if ty::has_attr(cx.tcx, def_id, "must_root") {
|
||||
cx.span_lint(UNROOTED_MUST_ROOT, ty.span, warning);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue