@@ -1344,14 +1344,6 @@ private module Debug {
1344
1344
result = resolvePath ( path )
1345
1345
}
1346
1346
1347
- private ItemNode sdfsf ( RelevantPath path , ImplItemNode impl , ItemNode frm ) {
1348
- path = getRelevantLocatable ( ) and
1349
- result = resolvePath ( path ) and
1350
- result = impl .resolveSelfTy ( ) and
1351
- frm = impl .getASuccessorRec ( "from" ) and
1352
- frm instanceof AssocItemNode
1353
- }
1354
-
1355
1347
predicate debugUseImportEdge ( Use use , string name , ItemNode item ) {
1356
1348
use = getRelevantLocatable ( ) and
1357
1349
useImportEdge ( use , name , item )
@@ -1372,59 +1364,3 @@ private module Debug {
1372
1364
fileImport ( m , f )
1373
1365
}
1374
1366
}
1375
-
1376
- private predicate sdfs ( ImplItemNode impl ) {
1377
- // resolvePath(impl.getSelfPath()).getLocation().getStartLine() = [35, 36]
1378
- impl .getLocation ( ) .getFile ( ) .getBaseName ( ) = "main.rs" //and
1379
- // impl.getLocation().getStartLine() = [35 .. 38]
1380
- }
1381
-
1382
- private import Type
1383
- private import TypeInference
1384
-
1385
- private predicate sdf3 (
1386
- AstNode n , Type t , ImplItemNode impl , string path , RelevantPath p , ImplOrTraitItemNode i ,
1387
- TraitType tt , Function f , string name
1388
- ) {
1389
- t = inferType ( n ) and
1390
- n .getLocation ( ) .getStartLine ( ) = 29 and
1391
- t = TStruct ( impl .resolveSelfTy ( ) ) and
1392
- // t = debugInferType(_, _) and
1393
- impl .toString ( ) = "impl ...::Iterator for ...::Args { ... }" and
1394
- path = p .toStringDebug ( ) and
1395
- p = impl .getTraitPath ( ) .getQualifier * ( ) and
1396
- i = resolvePath ( p ) and
1397
- impl .isFullyParametric ( ) and
1398
- tt = TTrait ( i ) and
1399
- f = tt .getMethod ( name ) and
1400
- f = i .getAnAssocItem ( ) and
1401
- name = "collect" and
1402
- f = impl .resolveSelfTy ( ) .getASuccessor ( name )
1403
- }
1404
-
1405
- private predicate sdf4 (
1406
- ImplItemNode impl , string path , RelevantPath p , ItemNode iter , Use u , string usePath ,
1407
- RelevantPath usePathPrefix , ItemNode useResolved
1408
- ) {
1409
- // t = debugInferType(_, _) and
1410
- impl .toString ( ) = "impl ...::Iterator for ...::Args { ... }" and
1411
- path = p .toStringDebug ( ) and
1412
- p = impl .getTraitPath ( ) .getQualifier * ( ) and
1413
- iter = resolvePath ( p ) and
1414
- iter .getName ( ) = "iter" and
1415
- u = iter .( Module ) .getItemList ( ) .getAnItem ( ) and
1416
- usePath = u .getUseTree ( ) .getPath ( ) .toStringDebug ( ) and
1417
- usePath = "self::traits::Iterator" and
1418
- usePathPrefix = u .getUseTree ( ) .getPath ( ) .getQualifier * ( ) and
1419
- useResolved = resolvePath ( usePathPrefix )
1420
- }
1421
-
1422
- private predicate sdf5 ( ImplItemNode impl , string path , RelevantPath p , ItemNode iter , Module m ) {
1423
- // t = debugInferType(_, _) and
1424
- impl .toString ( ) = "impl ...::Iterator for ...::Args { ... }" and
1425
- path = p .toStringDebug ( ) and
1426
- p = impl .getTraitPath ( ) .getQualifier * ( ) and
1427
- iter = resolvePath ( p ) and
1428
- iter .getName ( ) = "iter" and
1429
- m = iter .( Module ) .getItemList ( ) .getAnItem ( )
1430
- }
0 commit comments