diff options
| author | Michael Goulet <michael@errs.io> | 2023-06-19 20:48:46 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-06-22 18:34:24 +0000 |
| commit | 2fa796a3c796c819b53421577d5fd2e0f6a9f920 (patch) | |
| tree | 773546aed27261b207b12aa8803e137819680a5c /compiler/rustc_infer/src/traits/util.rs | |
| parent | 46a650f4e0783da10513e6d41c5f3c69e42b0198 (diff) | |
| download | rust-2fa796a3c796c819b53421577d5fd2e0f6a9f920.tar.gz rust-2fa796a3c796c819b53421577d5fd2e0f6a9f920.zip | |
Expect clause more
Diffstat (limited to 'compiler/rustc_infer/src/traits/util.rs')
| -rw-r--r-- | compiler/rustc_infer/src/traits/util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/traits/util.rs b/compiler/rustc_infer/src/traits/util.rs index a6475a766c4..26919872952 100644 --- a/compiler/rustc_infer/src/traits/util.rs +++ b/compiler/rustc_infer/src/traits/util.rs @@ -173,7 +173,7 @@ impl<'tcx> Elaboratable<'tcx> for (ty::Clause<'tcx>, Span) { } fn child(&self, predicate: ty::Predicate<'tcx>) -> Self { - (predicate.as_clause().unwrap(), self.1) + (predicate.expect_clause(), self.1) } fn child_with_derived_cause( @@ -183,7 +183,7 @@ impl<'tcx> Elaboratable<'tcx> for (ty::Clause<'tcx>, Span) { _parent_trait_pred: ty::PolyTraitPredicate<'tcx>, _index: usize, ) -> Self { - (predicate.as_clause().unwrap(), self.1) + (predicate.expect_clause(), self.1) } } @@ -193,7 +193,7 @@ impl<'tcx> Elaboratable<'tcx> for ty::Clause<'tcx> { } fn child(&self, predicate: ty::Predicate<'tcx>) -> Self { - predicate.as_clause().unwrap() + predicate.expect_clause() } fn child_with_derived_cause( @@ -203,7 +203,7 @@ impl<'tcx> Elaboratable<'tcx> for ty::Clause<'tcx> { _parent_trait_pred: ty::PolyTraitPredicate<'tcx>, _index: usize, ) -> Self { - predicate.as_clause().unwrap() + predicate.expect_clause() } } |
