File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,11 @@ pub(super) fn lower_generic_args(
194
194
match generic_arg {
195
195
ast:: GenericArg :: TypeArg ( type_arg) => {
196
196
let type_ref = TypeRef :: from_ast_opt ( lower_ctx, type_arg. ty ( ) ) ;
197
+ type_ref. walk ( & mut |tr| {
198
+ if let TypeRef :: ImplTrait ( bounds) = tr {
199
+ lower_ctx. update_impl_traits_bounds ( bounds. clone ( ) ) ;
200
+ }
201
+ } ) ;
197
202
args. push ( GenericArg :: Type ( type_ref) ) ;
198
203
}
199
204
ast:: GenericArg :: AssocTypeArg ( assoc_type_arg) => {
Original file line number Diff line number Diff line change @@ -2122,3 +2122,22 @@ fn test() {
2122
2122
"# ,
2123
2123
)
2124
2124
}
2125
+
2126
+ #[ test]
2127
+ fn issue_17191 ( ) {
2128
+ check_types (
2129
+ r#"
2130
+ trait A {
2131
+ type Item;
2132
+ }
2133
+
2134
+ trait B<T> {}
2135
+
2136
+ fn foo<T: B<impl A>>() {}
2137
+
2138
+ fn test() {
2139
+ let f = foo;
2140
+ //^ fn foo<{unknown}>()
2141
+ }"# ,
2142
+ ) ;
2143
+ }
You can’t perform that action at this time.
0 commit comments