about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2022-08-10 10:02:03 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2022-08-10 10:02:03 -0700
commitdfb3713cdb7303a250d8b23792fe801319edf36c (patch)
treef54aeb9880393e6b93fd5d11eff1e5bbe9c86585 /compiler
parenta3b84ad197fb209d903857df747af3ca0a1f2c25 (diff)
downloadrust-dfb3713cdb7303a250d8b23792fe801319edf36c.tar.gz
rust-dfb3713cdb7303a250d8b23792fe801319edf36c.zip
Update error message to clarify that it's not the enum itself that's non_exhaustive
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_typeck/src/check/cast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/check/cast.rs b/compiler/rustc_typeck/src/check/cast.rs
index 88bce06297b..6c7b2a2889f 100644
--- a/compiler/rustc_typeck/src/check/cast.rs
+++ b/compiler/rustc_typeck/src/check/cast.rs
@@ -601,7 +601,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
                     self.cast_ty,
                     fcx,
                 )
-                .note("cannot cast a non-exhaustive enum defined in another crate")
+                .note("cannot cast an enum with a non-exhaustive variant when it's defined in another crate")
                 .emit();
             }
         }