add helper methods for accessing struct tail
This commit is contained in:
parent
e3de14e463
commit
7aa5f39d3b
9 changed files with 31 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue