File tree 3 files changed +65
-0
lines changed
compiler/rustc_next_trait_solver/src/solve/normalizes_to
3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ where
235
235
. map ( |pred| goal. with ( cx, pred) ) ;
236
236
ecx. add_goals ( GoalSource :: ImplWhereBound , where_clause_bounds) ;
237
237
238
+ ecx. try_evaluate_added_goals ( ) ?;
239
+
238
240
// Add GAT where clauses from the trait's definition.
239
241
// FIXME: We don't need these, since these are the type's own WF obligations.
240
242
ecx. add_goals (
Original file line number Diff line number Diff line change
1
+ //@ check-pass
2
+ //@ revisions: current next
3
+ //@ ignore-compare-mode-next-solver (explicit revisions)
4
+ //@[next] compile-flags: -Znext-solver
5
+ //@ edition: 2024
6
+
7
+ use std:: future:: Future ;
8
+
9
+ trait Handler { }
10
+
11
+ struct W < T > ( T ) ;
12
+
13
+ trait SendTarget {
14
+ fn call ( self ) -> impl Future < Output = ( ) > + Send ;
15
+ }
16
+
17
+ impl < T > SendTarget for W < T >
18
+ where
19
+ T : Handler + Send ,
20
+ {
21
+ async fn call ( self ) {
22
+ todo ! ( )
23
+ }
24
+ }
25
+
26
+ impl < T > SendTarget for T
27
+ where
28
+ T : Handler + Send ,
29
+ {
30
+ async fn call ( self ) {
31
+ W ( self ) . call ( ) . await
32
+ }
33
+ }
34
+
35
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ //@ check-pass
2
+ //@ revisions: current next
3
+ //@ ignore-compare-mode-next-solver (explicit revisions)
4
+ //@[next] compile-flags: -Znext-solver
5
+ //@ edition: 2024
6
+
7
+ trait Foo {
8
+ fn call ( self ) -> impl Send ;
9
+ }
10
+
11
+ trait Nested { }
12
+ impl < T > Foo for T
13
+ where
14
+ T : Nested ,
15
+ {
16
+ fn call ( self ) -> impl Sized {
17
+ NotSatisfied . call ( )
18
+ }
19
+ }
20
+
21
+ struct NotSatisfied ;
22
+ impl Foo for NotSatisfied {
23
+ fn call ( self ) -> impl Sized {
24
+ todo ! ( )
25
+ }
26
+ }
27
+
28
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments