diff --git a/rust/ql/lib/codeql/rust/internal/PathResolution.qll b/rust/ql/lib/codeql/rust/internal/PathResolution.qll index 13e1e0d381d..2b9cd42105c 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolution.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolution.qll @@ -774,8 +774,11 @@ private TypeItemNode resolveBuiltin(TypeRepr tr) { tr instanceof RefTypeRepr and result instanceof Builtins::RefType or - tr instanceof PtrTypeRepr and - result instanceof Builtins::PtrType + tr.(PtrTypeRepr).isConst() and + result instanceof Builtins::PtrConstType + or + tr.(PtrTypeRepr).isMut() and + result instanceof Builtins::PtrMutType or result.(Builtins::TupleType).getArity() = tr.(TupleTypeRepr).getNumberOfFields() } diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected index 74a86d6a01d..16db4f5c090 100644 --- a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected @@ -11,6 +11,3 @@ multipleCallTargets | main.rs:2642:13:2642:31 | ...::from(...) | | main.rs:2643:13:2643:31 | ...::from(...) | | main.rs:2644:13:2644:31 | ...::from(...) | -multiplePathResolutions -| main.rs:1818:26:1818:33 | <...> | -| main.rs:1819:17:1819:26 | <...> |