Skip to content

Commit 258257a

Browse files
Rollup merge of #106525 - compiler-errors:new-solver-wf, r=jackh726
Report WF error for chalk *and* new solver addressing this nit #106385 (comment) No test yet because new solver is currently unusable, lol r? `@lcnr`
2 parents 84f22e4 + a9d093b commit 258257a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
11681168
}
11691169

11701170
ty::PredicateKind::WellFormed(ty) => {
1171-
if self.tcx.sess.opts.unstable_opts.trait_solver != TraitSolver::Chalk {
1171+
if self.tcx.sess.opts.unstable_opts.trait_solver == TraitSolver::Classic {
11721172
// WF predicates cannot themselves make
11731173
// errors. They can only block due to
11741174
// ambiguity; otherwise, they always
@@ -1180,7 +1180,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
11801180
// which bounds actually failed to hold.
11811181
self.tcx.sess.struct_span_err(
11821182
span,
1183-
&format!("the type `{}` is not well-formed (chalk)", ty),
1183+
&format!("the type `{}` is not well-formed", ty),
11841184
)
11851185
}
11861186
}

src/test/ui/chalkify/recursive_where_clause_on_type.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ fn foo<T: Foo>() {
2525
fn main() {
2626
// For some reason, the error is duplicated...
2727

28-
foo::<S>() //~ ERROR the type `S` is not well-formed (chalk)
29-
//~^ ERROR the type `S` is not well-formed (chalk)
28+
foo::<S>() //~ ERROR the type `S` is not well-formed
29+
//~^ ERROR the type `S` is not well-formed
3030
}

src/test/ui/chalkify/recursive_where_clause_on_type.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: the type `S` is not well-formed (chalk)
1+
error: the type `S` is not well-formed
22
--> $DIR/recursive_where_clause_on_type.rs:28:11
33
|
44
LL | foo::<S>()
55
| ^
66

7-
error: the type `S` is not well-formed (chalk)
7+
error: the type `S` is not well-formed
88
--> $DIR/recursive_where_clause_on_type.rs:28:5
99
|
1010
LL | foo::<S>()

0 commit comments

Comments
 (0)