]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_middle/src/ty/inhabitedness/mod.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / compiler / rustc_middle / src / ty / inhabitedness / mod.rs
index 3d22f5a04a2bf1879c22dbd232c8904d95663f93..aaa66deb2a3ecf98223c69477a5321ac3962bd8a 100644 (file)
@@ -169,14 +169,10 @@ impl<'tcx> FieldDef {
         param_env: ty::ParamEnv<'tcx>,
     ) -> DefIdForest<'tcx> {
         let data_uninhabitedness = move || self.ty(tcx, substs).uninhabited_from(tcx, param_env);
-        // FIXME(canndrew): Currently enum fields are (incorrectly) stored with
-        // `Visibility::Invisible` so we need to override `self.vis` if we're
-        // dealing with an enum.
         if is_enum {
             data_uninhabitedness()
         } else {
             match self.vis {
-                Visibility::Invisible => DefIdForest::empty(),
                 Visibility::Restricted(from) => {
                     let forest = DefIdForest::from_id(from);
                     let iter = Some(forest).into_iter().chain(Some(data_uninhabitedness()));