about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/lib.rs
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2024-01-01 23:54:20 +0100
committerNadrieril <nadrieril+git@gmail.com>2024-01-07 22:13:08 +0100
commit4b2e8bc8416003663530c45c84eac70116d01f92 (patch)
tree8dc10bdef6c33949fa1ae4c14f06520be744f503 /compiler/rustc_pattern_analysis/src/lib.rs
parent07d5f1942680c18f88e27678d9ca995a77b4c15c (diff)
downloadrust-4b2e8bc8416003663530c45c84eac70116d01f92.tar.gz
rust-4b2e8bc8416003663530c45c84eac70116d01f92.zip
Abort analysis on type error
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lib.rs')
-rw-r--r--compiler/rustc_pattern_analysis/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs
index 4d2d66c88a5..b52643adcc9 100644
--- a/compiler/rustc_pattern_analysis/src/lib.rs
+++ b/compiler/rustc_pattern_analysis/src/lib.rs
@@ -77,7 +77,7 @@ pub trait TypeCx: Sized + fmt::Debug {
     /// The set of all the constructors for `ty`.
     ///
     /// This must follow the invariants of `ConstructorSet`
-    fn ctors_for_ty(&self, ty: Self::Ty) -> ConstructorSet<Self>;
+    fn ctors_for_ty(&self, ty: Self::Ty) -> Result<ConstructorSet<Self>, Self::Error>;
 
     /// Best-effort `Debug` implementation.
     fn debug_pat(f: &mut fmt::Formatter<'_>, pat: &DeconstructedPat<'_, Self>) -> fmt::Result;