File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
compiler/rustc_next_trait_solver/src/solve/normalizes_to
tests/ui/async-await/in-trait Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ where
194194 . map ( |pred| goal. with ( cx, pred) ) ;
195195 ecx. add_goals ( GoalSource :: ImplWhereBound , where_clause_bounds) ;
196196
197+ ecx. try_evaluate_added_goals ( ) ?;
198+
197199 // Add GAT where clauses from the trait's definition.
198200 // FIXME: We don't need these, since these are the type's own WF obligations.
199201 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 ( ) { }
You can’t perform that action at this time.
0 commit comments