File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -305,9 +305,7 @@ pub fn transitive_bounds_that_define_assoc_type<'tcx>(
305305 Some ( assoc_name) ,
306306 ) ) ;
307307 for ( super_predicate, _) in super_predicates. predicates {
308- let bound_predicate = super_predicate. kind ( ) ;
309- let subst_predicate = super_predicate
310- . subst_supertrait ( tcx, & bound_predicate. rebind ( trait_ref. skip_binder ( ) ) ) ;
308+ let subst_predicate = super_predicate. subst_supertrait ( tcx, & trait_ref) ;
311309 if let Some ( binder) = subst_predicate. to_opt_poly_trait_ref ( ) {
312310 stack. push ( binder. value ) ;
313311 }
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ impl FlagComputation {
5959 {
6060 let mut computation = FlagComputation :: new ( ) ;
6161
62+ if !value. bound_vars ( ) . is_empty ( ) {
63+ computation. flags = computation. flags | TypeFlags :: HAS_RE_LATE_BOUND ;
64+ }
65+
6266 f ( & mut computation, value. skip_binder ( ) ) ;
6367
6468 self . add_flags ( computation. flags ) ;
Original file line number Diff line number Diff line change 1+ // build-pass
2+ // compile-flags: --edition 2018
3+ // compile-flags: --crate-type rlib
4+
5+ use std:: future:: Future ;
6+
7+ async fn handle < F > ( slf : & F )
8+ where
9+ F : Fn ( & ( ) ) -> Box < dyn for < ' a > Future < Output = ( ) > + Unpin > ,
10+ {
11+ ( slf) ( & ( ) ) . await ;
12+ }
13+
14+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ // run-pass
2+ // compile-flags: -Zsymbol-mangling-version=v0
3+
4+ pub fn f < T : ?Sized > ( ) { }
5+ pub trait Frob < T : ?Sized > { }
6+ fn main ( ) {
7+ f :: < dyn Frob < str > > ( ) ;
8+ f :: < dyn for < ' a > Frob < str > > ( ) ;
9+ }
You can’t perform that action at this time.
0 commit comments