Update src/librustc_typeck/check/mod.rs
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
parent
e247a40a1c
commit
05a644e825
1 changed files with 1 additions and 1 deletions
|
|
@ -1402,7 +1402,7 @@ fn check_union_fields<'tcx>(tcx: TyCtxt<'tcx>, _sp: Span, item_def_id: DefId) ->
|
|||
let fields = &def.non_enum_variant().fields;
|
||||
for field in fields {
|
||||
let field_ty = field.ty(tcx, substs);
|
||||
// We are currently checking the type this field came from, so it must be local
|
||||
// We are currently checking the type this field came from, so it must be local.
|
||||
let field_span = tcx.hir().span_if_local(field.did).unwrap();
|
||||
let param_env = tcx.param_env(field.did);
|
||||
if field_ty.needs_drop(tcx, param_env) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue