Skip to content

Commit 8c5ae86

Browse files
SimonSapinCentril
authored andcommitted
Update src/librustc_typeck/check/mod.rs
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent 05a644e commit 8c5ae86

File tree

1 file changed

+3
-1
lines changed
  • src/librustc_typeck/check

1 file changed

+3
-1
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,9 @@ fn check_union(tcx: TyCtxt<'_>, id: hir::HirId, span: Span) {
13911391
check_packed(tcx, span, def_id);
13921392
}
13931393

1394-
fn check_union_fields<'tcx>(tcx: TyCtxt<'tcx>, _sp: Span, item_def_id: DefId) -> bool {
1394+
/// When the `#![feature(untagged_unions)]` gate is active,
1395+
/// check that the fields of the `union` does not contain fields that need dropping.
1396+
fn check_union_fields(tcx: TyCtxt<'_>, _: Span, item_def_id: DefId) -> bool {
13951397
// Without the feature we check Copy types only later
13961398
if !tcx.features().untagged_unions {
13971399
return true;

0 commit comments

Comments
 (0)