File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
compiler/rustc_hir_analysis/src/check
src/test/ui/impl-trait/in-trait Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ pub fn collect_trait_impl_trait_tys<'tcx>(
597597 let num_trait_substs = trait_to_impl_substs. len ( ) ;
598598 let num_impl_substs = tcx. generics_of ( impl_m. container_id ( tcx) ) . params . len ( ) ;
599599 let ty = tcx. fold_regions ( ty, |region, _| {
600- let ty:: ReFree ( _) = region. kind ( ) else { return region; } ;
600+ let ( ty:: ReFree ( _) | ty :: ReEarlyBound ( _ ) ) = region. kind ( ) else { return region; } ;
601601 let Some ( ty:: ReEarlyBound ( e) ) = map. get ( & region. into ( ) ) . map ( |r| r. expect_region ( ) . kind ( ) )
602602 else {
603603 tcx
Original file line number Diff line number Diff line change 1+ // check-pass
2+ // edition:2021
3+
4+ #![ feature( async_fn_in_trait, return_position_impl_trait_in_trait) ]
5+ #![ allow( incomplete_features) ]
6+
7+ pub trait Foo {
8+ async fn bar < ' a : ' a > ( & ' a mut self ) ;
9+ }
10+
11+ impl Foo for ( ) {
12+ async fn bar < ' a : ' a > ( & ' a mut self ) { }
13+ }
14+
15+ pub trait Foo2 {
16+ fn bar < ' a : ' a > ( & ' a mut self ) -> impl Sized + ' a ;
17+ }
18+
19+ impl Foo2 for ( ) {
20+ fn bar < ' a : ' a > ( & ' a mut self ) -> impl Sized + ' a { }
21+ }
22+
23+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments