about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-06-30 10:17:49 -0400
committerRalf Jung <post@ralfj.de>2022-07-13 18:31:29 -0400
commit07fe9882cc6e03682fcfa7b18c8f5b998219bdd2 (patch)
tree5277e7ee1a3d35da9983ab738d8167704db80d4a /compiler
parente4593ef0f214b7259e5f5706b2952610ae1fb5ef (diff)
downloadrust-07fe9882cc6e03682fcfa7b18c8f5b998219bdd2.tar.gz
rust-07fe9882cc6e03682fcfa7b18c8f5b998219bdd2.zip
add array tests, cleanup, tidy, and bless
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_feature/src/removed.rs2
-rw-r--r--compiler/rustc_typeck/src/check/check.rs2
-rw-r--r--compiler/rustc_typeck/src/lib.rs1
3 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs
index 3b0f9a65e07..2ddaf920109 100644
--- a/compiler/rustc_feature/src/removed.rs
+++ b/compiler/rustc_feature/src/removed.rs
@@ -182,7 +182,7 @@ declare_features! (
     (removed, unsafe_no_drop_flag, "1.0.0", None, None, None),
     /// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue.
     (removed, untagged_unions, "1.13.0", Some(55149), None,
-     Some("unions with `Copy` and `MaybeUninit` fields are stable; there is no intent to stabilize more")),
+     Some("unions with `Copy` and `ManuallyDrop` fields are stable; there is no intent to stabilize more")),
     /// Allows `#[unwind(..)]`.
     ///
     /// Permits specifying whether a function should permit unwinding or abort on unwind.
diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs
index 9c522807bf6..dfcd35d2178 100644
--- a/compiler/rustc_typeck/src/check/check.rs
+++ b/compiler/rustc_typeck/src/check/check.rs
@@ -422,7 +422,7 @@ fn check_union_fields(tcx: TyCtxt<'_>, span: Span, item_def_id: LocalDefId) -> b
                 }
                 _ => {
                     // Fallback case: allow `ManuallyDrop` and things that are `Copy`.
-                    ty.ty_adt_def().map_or(false, |adt_def| adt_def.is_manually_drop())
+                    ty.ty_adt_def().is_some_and(|adt_def| adt_def.is_manually_drop())
                         || ty.is_copy_modulo_regions(tcx.at(span), param_env)
                 }
             }
diff --git a/compiler/rustc_typeck/src/lib.rs b/compiler/rustc_typeck/src/lib.rs
index dd712fd7ed7..f98ae46c587 100644
--- a/compiler/rustc_typeck/src/lib.rs
+++ b/compiler/rustc_typeck/src/lib.rs
@@ -72,6 +72,7 @@ This API is completely unstable and subject to change.
 #![feature(once_cell)]
 #![feature(slice_partition_dedup)]
 #![feature(try_blocks)]
+#![feature(is_some_with)]
 #![recursion_limit = "256"]
 
 #[macro_use]