@@ -447,7 +447,7 @@ fn visit_arm(ir: &mut IrMaps, arm: &ast::Arm) {
447447fn visit_expr ( ir : & mut IrMaps , expr : & Expr ) {
448448 match expr. node {
449449 // live nodes required for uses or definitions of variables:
450- ast:: ExprPath ( _) => {
450+ ast:: ExprPath ( _) | ast :: ExprQPath ( _ ) => {
451451 let def = ir. tcx . def_map . borrow ( ) [ expr. id ] . clone ( ) ;
452452 debug ! ( "expr {}: path that leads to {:?}" , expr. id, def) ;
453453 if let DefLocal ( ..) = def {
@@ -960,7 +960,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
960960 match expr. node {
961961 // Interesting cases with control flow or which gen/kill
962962
963- ast:: ExprPath ( _) => {
963+ ast:: ExprPath ( _) | ast :: ExprQPath ( _ ) => {
964964 self . access_path ( expr, succ, ACC_READ | ACC_USE )
965965 }
966966
@@ -1289,7 +1289,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
12891289 // just ignore such cases and treat them as reads.
12901290
12911291 match expr. node {
1292- ast:: ExprPath ( _) => succ,
1292+ ast:: ExprPath ( _) | ast :: ExprQPath ( _ ) => succ,
12931293 ast:: ExprField ( ref e, _) => self . propagate_through_expr ( & * * e, succ) ,
12941294 ast:: ExprTupField ( ref e, _) => self . propagate_through_expr ( & * * e, succ) ,
12951295 _ => self . propagate_through_expr ( expr, succ)
@@ -1300,7 +1300,9 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
13001300 fn write_lvalue ( & mut self , expr : & Expr , succ : LiveNode , acc : uint )
13011301 -> LiveNode {
13021302 match expr. node {
1303- ast:: ExprPath ( _) => self . access_path ( expr, succ, acc) ,
1303+ ast:: ExprPath ( _) | ast:: ExprQPath ( _) => {
1304+ self . access_path ( expr, succ, acc)
1305+ }
13041306
13051307 // We do not track other lvalues, so just propagate through
13061308 // to their subcomponents. Also, it may happen that
@@ -1492,7 +1494,7 @@ fn check_expr(this: &mut Liveness, expr: &Expr) {
14921494 ast:: ExprBlock ( ..) | ast:: ExprMac ( ..) | ast:: ExprAddrOf ( ..) |
14931495 ast:: ExprStruct ( ..) | ast:: ExprRepeat ( ..) | ast:: ExprParen ( ..) |
14941496 ast:: ExprClosure ( ..) | ast:: ExprPath ( ..) | ast:: ExprBox ( ..) |
1495- ast:: ExprRange ( ..) => {
1497+ ast:: ExprRange ( ..) | ast :: ExprQPath ( .. ) => {
14961498 visit:: walk_expr ( this, expr) ;
14971499 }
14981500 ast:: ExprIfLet ( ..) => {
@@ -1583,7 +1585,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
15831585
15841586 fn check_lvalue ( & mut self , expr : & Expr ) {
15851587 match expr. node {
1586- ast:: ExprPath ( _) => {
1588+ ast:: ExprPath ( _) | ast :: ExprQPath ( _ ) => {
15871589 if let DefLocal ( nid) = self . ir . tcx . def_map . borrow ( ) [ expr. id ] . clone ( ) {
15881590 // Assignment to an immutable variable or argument: only legal
15891591 // if there is no later assignment. If this local is actually
0 commit comments