about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-12 10:17:32 +0000
committerbors <bors@rust-lang.org>2024-09-12 10:17:32 +0000
commitf753bc769b16ca9673f11a4cc06e5cc681efd84e (patch)
treef6f420c7a91cf89312587a03c1224cfefc95bd7c /compiler/rustc_middle/src/ty
parent7c7372b6a1b9a8d6b787a3e5a10e4f8325b1fdfc (diff)
parente866f8a97d1f08e8a187323a1a5838f88fe33d81 (diff)
downloadrust-f753bc769b16ca9673f11a4cc06e5cc681efd84e.tar.gz
rust-f753bc769b16ca9673f11a4cc06e5cc681efd84e.zip
Auto merge of #130249 - compiler-errors:sad-new-solver-coherence, r=lcnr
Revert "Stabilize `-Znext-solver=coherence`"

This is a clean revert of #121848, prepared by running:

```
$ git revert 17b322fa69eed7216dccc9f097eb68237cf62234 -m1
```

Which effectively reverts:
* a138a9261536ac2bdbb7c01a8aa9dc7d43299cae, 69fdd1457d367ce4de044e9784e58a38acf3d847, d93e047c9f1b33892a604273ab3931815f5604a1, 1a893ac648e03732aaa8b5371b602ab683970b0d

see: https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/nalgebra.20hang

Closes #130056

r? lcnr
Diffstat (limited to 'compiler/rustc_middle/src/ty')
-rw-r--r--compiler/rustc_middle/src/ty/context.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 1c8916b255e..ae1fd35ec27 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -3132,11 +3132,11 @@ impl<'tcx> TyCtxt<'tcx> {
     }
 
     pub fn next_trait_solver_globally(self) -> bool {
-        self.sess.opts.unstable_opts.next_solver.globally
+        self.sess.opts.unstable_opts.next_solver.map_or(false, |c| c.globally)
     }
 
     pub fn next_trait_solver_in_coherence(self) -> bool {
-        self.sess.opts.unstable_opts.next_solver.coherence
+        self.sess.opts.unstable_opts.next_solver.map_or(false, |c| c.coherence)
     }
 
     pub fn is_impl_trait_in_trait(self, def_id: DefId) -> bool {