add helper methods for accessing struct tail
This commit is contained in:
@@ -981,7 +981,7 @@ fn check_type_defn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item<'tcx>, all_sized: b
|
||||
// intermediate types must be sized.
|
||||
let needs_drop_copy = || {
|
||||
packed && {
|
||||
let ty = tcx.type_of(variant.fields.raw.last().unwrap().did).subst_identity();
|
||||
let ty = tcx.type_of(variant.tail().did).subst_identity();
|
||||
let ty = tcx.erase_regions(ty);
|
||||
if ty.has_infer() {
|
||||
tcx.sess
|
||||
|
||||
Reference in New Issue
Block a user