diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2019-07-04 15:52:37 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-10-11 10:43:54 +0200 |
| commit | 8c5ae86496d25ddd9df3486df46bcb671ce619ad (patch) | |
| tree | e64dbf19a876bcb722ffdd01bcfe23529b2fe82e | |
| parent | 05a644e8257b20c3372f27420d28bef5fd6d6d73 (diff) | |
| download | rust-8c5ae86496d25ddd9df3486df46bcb671ce619ad.tar.gz rust-8c5ae86496d25ddd9df3486df46bcb671ce619ad.zip | |
Update src/librustc_typeck/check/mod.rs
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 294d1992b9d..a8b3a048389 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1391,7 +1391,9 @@ fn check_union(tcx: TyCtxt<'_>, id: hir::HirId, span: Span) { check_packed(tcx, span, def_id); } -fn check_union_fields<'tcx>(tcx: TyCtxt<'tcx>, _sp: Span, item_def_id: DefId) -> bool { +/// When the `#![feature(untagged_unions)]` gate is active, +/// check that the fields of the `union` does not contain fields that need dropping. +fn check_union_fields(tcx: TyCtxt<'_>, _: Span, item_def_id: DefId) -> bool { // Without the feature we check Copy types only later if !tcx.features().untagged_unions { return true; |
