1
Fork 0

Update error message to clarify that it's not the enum itself that's non_exhaustive

This commit is contained in:
Scott McMurray 2022-08-10 10:02:03 -07:00
parent a3b84ad197
commit dfb3713cdb
2 changed files with 2 additions and 2 deletions

View file

@ -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();
}
}