File tree Expand file tree Collapse file tree 2 files changed +528
-495
lines changed
rust/ql/test/library-tests/type-inference Expand file tree Collapse file tree 2 files changed +528
-495
lines changed Original file line number Diff line number Diff line change @@ -260,13 +260,26 @@ mod type_param_access_associated_type {
260260 )
261261 }
262262
263+ // Associated type accessed on a type parameter of an impl block
264+ impl < TI > Wrapper < TI >
265+ where
266+ TI : GetSet ,
267+ {
268+ fn extract ( & self ) -> TI :: Output {
269+ self . 0 . get ( ) // $ fieldof=Wrapper target=GetSet::get
270+ }
271+ }
272+
263273 pub fn test ( ) {
264274 let _o1 = tp_with_as ( S ) ; // $ target=tp_with_as MISSING: type=_o1:S3
265275 let _o2 = tp_without_as ( S ) ; // $ target=tp_without_as MISSING: type=_o2:S3
266276 let (
267277 _o3, // $ MISSING: type=_o3:S3
268278 _o4, // $ MISSING: type=_o4:bool
269279 ) = tp_assoc_from_supertrait ( S ) ; // $ target=tp_assoc_from_supertrait
280+
281+ let w = Wrapper ( S ) ;
282+ let _extracted = w. extract ( ) ; // $ target=extract MISSING: type=_extracted:S3
270283 }
271284}
272285
You can’t perform that action at this time.
0 commit comments