summaryrefslogtreecommitdiff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-13 11:05:33 +0530
committerGitHub <noreply@github.com>2023-05-13 11:05:33 +0530
commit05ca3e31df8366578d61f35a29a17bf48b20ac48 (patch)
treece777f5458807add2f4d2d2a84393d365d0c33c4 /compiler/rustc_middle
parent36125c43da00a2c57452e72c3cf81b71b13de208 (diff)
parent14bf909e71209fc946f35ffba8ae6572c9575715 (diff)
downloadrust-05ca3e31df8366578d61f35a29a17bf48b20ac48.tar.gz
Rollup merge of #111451 - compiler-errors:note-cast-origin, r=b-naber
Note user-facing types of coercion failure When coercing, for example, `Box<A>` into `Box<dyn B>`, make sure that any failure notes mention *those* specific types, rather than mentioning inner types, like "the cast from `A` to `dyn B`". I expect end-users are often confused when we skip layers of types and only mention the "innermost" part of a coercion, especially when other notes point at HIR, e.g. #111406.
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/traits/mod.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs
index 449c453555e..2f0b07d4c71 100644
--- a/compiler/rustc_middle/src/traits/mod.rs
+++ b/compiler/rustc_middle/src/traits/mod.rs
@@ -281,9 +281,6 @@ pub enum ObligationCauseCode<'tcx> {
/// A type like `Box<Foo<'a> + 'b>` is WF only if `'b: 'a`.
ObjectTypeBound(Ty<'tcx>, ty::Region<'tcx>),
- /// Obligation incurred due to an object cast.
- ObjectCastObligation(/* Concrete type */ Ty<'tcx>, /* Object type */ Ty<'tcx>),
-
/// Obligation incurred due to a coercion.
Coercion {
source: Ty<'tcx>,