]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc_borrowck/borrowck/gather_loans/move_error.rs
New upstream version 1.17.0+dfsg1
[rustc.git] / src / librustc_borrowck / borrowck / gather_loans / move_error.rs
index 47f8d978704f4710145305f1c40d9b74b4ea8b8b..3678c2e55c1fdb17d0d175796e282f167f98f861 100644 (file)
@@ -150,7 +150,7 @@ fn report_cannot_move_out_of<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
         Categorization::Downcast(ref b, _) |
         Categorization::Interior(ref b, mc::InteriorField(_)) => {
             match b.ty.sty {
-                ty::TyAdt(def, _) if def.has_dtor() => {
+                ty::TyAdt(def, _) if def.has_dtor(bccx.tcx) => {
                     let mut err = struct_span_err!(bccx, move_from.span, E0509,
                                                    "cannot move out of type `{}`, \
                                                    which implements the `Drop` trait",