about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_mir/borrow_check.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_mir/borrow_check.rs b/src/librustc_mir/borrow_check.rs
index f4bf280cd25..18bb78ef50f 100644
--- a/src/librustc_mir/borrow_check.rs
+++ b/src/librustc_mir/borrow_check.rs
@@ -1178,8 +1178,10 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
                     format!("{}", field_index)
                 },
                 _ => {
-                    debug!("End-user description not implemented for field of type {:?}", ty.sty);
-                    format!("<ty>{}", field_index)
+                    // Might need a revision when the fields in trait RFC is implemented
+                    // (https://github.com/rust-lang/rfcs/pull/1546)
+                    bug!("Field access unsupported for non-box types that are neither Adt (struct, \
+                         enum, union) nor tuples");
                 }
             }
         }