From 27ddc813af3b1546c32344927a8e431b01409dd1 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Thu, 4 Dec 2025 16:22:54 +0100 Subject: [PATCH] Rust: Cleanup of raw pointer types based in PR feedback --- .../rust/frameworks/stdlib/Builtins.qll | 8 +- rust/ql/lib/codeql/rust/internal/Type.qll | 4 +- .../codeql/rust/internal/TypeInference.qll | 22 +++-- .../type-inference/type-inference.expected | 92 +++++++++---------- 4 files changed, 66 insertions(+), 60 deletions(-) diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll index e87eb25279a..9021e5d3643 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll @@ -177,17 +177,19 @@ class RefMutType extends BuiltinType { } /** A builtin raw pointer type `*const T` or `*mut T`. */ -abstract class PtrType extends BuiltinType { } +abstract private class PtrTypeImpl extends BuiltinType { } + +final class PtrType = PtrTypeImpl; /** The builtin raw pointer type `*const T`. */ -class PtrConstType extends PtrType { +class PtrConstType extends PtrTypeImpl { PtrConstType() { this.getName() = "PtrConst" } override string getDisplayName() { result = "*const" } } /** The builtin raw pointer type `*mut T`. */ -class PtrMutType extends PtrType { +class PtrMutType extends PtrTypeImpl { PtrMutType() { this.getName() = "PtrMut" } override string getDisplayName() { result = "*mut" } diff --git a/rust/ql/lib/codeql/rust/internal/Type.qll b/rust/ql/lib/codeql/rust/internal/Type.qll index fb639cb9acf..b187a64dec1 100644 --- a/rust/ql/lib/codeql/rust/internal/Type.qll +++ b/rust/ql/lib/codeql/rust/internal/Type.qll @@ -339,9 +339,7 @@ class NeverType extends Type, TNeverType { override Location getLocation() { result instanceof EmptyLocation } } -abstract class PtrType extends StructType { - override Location getLocation() { result instanceof EmptyLocation } -} +abstract class PtrType extends StructType { } pragma[nomagic] TypeParamTypeParameter getPtrTypeParameter() { diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll index 149bf820510..fe4937a2ef3 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll @@ -609,12 +609,12 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat strictcount(Expr e | bodyReturns(n1, e)) = 1 ) or - exists(RefExpr re | - n2 = re and - n1 = re.getExpr() and - prefix1.isEmpty() and - prefix2 = TypePath::singleton(inferRefExprType(re).getPositionalTypeParameter(0)) - ) + n2 = + any(RefExpr re | + n1 = re.getExpr() and + prefix1.isEmpty() and + prefix2 = TypePath::singleton(inferRefExprType(re).getPositionalTypeParameter(0)) + ) or n1 = n2.(RefPat).getPat() and prefix1.isEmpty() and @@ -3162,6 +3162,12 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) { ) } +pragma[nomagic] +private Type getInferredDerefType(DerefExpr de, TypePath path) { result = inferType(de, path) } + +pragma[nomagic] +private PtrType getInferredDerefExprPtrType(DerefExpr de) { result = inferType(de.getExpr()) } + /** * Gets the inferred type of `n` at `path` when `n` occurs in a dereference * expression `*n` and when `n` is known to have a raw pointer type. @@ -3171,8 +3177,8 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) { private Type inferDereferencedExprPtrType(AstNode n, TypePath path) { exists(DerefExpr de, PtrType type, TypePath suffix | de.getExpr() = n and - type = inferType(de.getExpr()) and - result = inferType(de, suffix) and + type = getInferredDerefExprPtrType(de) and + result = getInferredDerefType(de, suffix) and path = TypePath::cons(type.getPositionalTypeParameter(0), suffix) ) } diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected index 0194b9e4643..ff3545f0c0f 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -2256,23 +2256,23 @@ inferCertainType | main.rs:1803:13:1803:13 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1803:17:1803:33 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | | main.rs:1806:26:1806:30 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1806:26:1806:30 | SelfParam | TRef | file://:0:0:0:0 | *mut | +| main.rs:1806:26:1806:30 | SelfParam | TRef | {EXTERNAL LOCATION} | *mut | | main.rs:1806:26:1806:30 | SelfParam | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1806:39:1808:13 | { ... } | | {EXTERNAL LOCATION} | & | | main.rs:1806:39:1808:13 | { ... } | TRef | main.rs:1805:14:1805:23 | T | | main.rs:1807:26:1807:32 | &... | | {EXTERNAL LOCATION} | & | | main.rs:1807:29:1807:32 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1807:29:1807:32 | self | TRef | file://:0:0:0:0 | *mut | +| main.rs:1807:29:1807:32 | self | TRef | {EXTERNAL LOCATION} | *mut | | main.rs:1807:29:1807:32 | self | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1810:31:1812:13 | { ... } | | main.rs:1805:14:1805:23 | T | -| main.rs:1816:13:1816:13 | p | | file://:0:0:0:0 | *mut | +| main.rs:1816:13:1816:13 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1816:13:1816:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | & | -| main.rs:1817:26:1817:26 | p | | file://:0:0:0:0 | *mut | +| main.rs:1817:26:1817:26 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1817:26:1817:26 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1818:26:1818:48 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | | main.rs:1818:46:1818:47 | &p | | {EXTERNAL LOCATION} | & | -| main.rs:1818:47:1818:47 | p | | file://:0:0:0:0 | *mut | +| main.rs:1818:47:1818:47 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1818:47:1818:47 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1819:13:1819:13 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1819:17:1819:37 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | @@ -4422,52 +4422,52 @@ inferCertainType | pattern_matching.rs:843:5:843:32 | patterns_in_let_statements(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:844:5:844:37 | patterns_in_function_parameters(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:845:5:845:30 | patterns_in_control_flow(...) | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:3:28:3:28 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:3:28:3:28 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:3:28:3:28 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:3:50:6:1 | { ... } | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:4:24:4:24 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:4:24:4:24 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:4:24:4:24 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:8:26:8:26 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:8:26:8:26 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:8:26:8:26 | x | TPtrMut | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:8:47:11:1 | { ... } | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:9:24:9:24 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:9:24:9:24 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:9:24:9:24 | x | TPtrMut | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:13:23:19:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:14:9:14:9 | a | | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:15:9:15:9 | x | | file://:0:0:0:0 | *const | -| raw_pointer.rs:15:13:15:24 | &raw const a | | file://:0:0:0:0 | *const | +| raw_pointer.rs:15:9:15:9 | x | | {EXTERNAL LOCATION} | *const | +| raw_pointer.rs:15:13:15:24 | &raw const a | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:15:24:15:24 | a | | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:16:5:18:5 | { ... } | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:17:19:17:19 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:17:19:17:19 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:21:21:27:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:22:13:22:13 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:22:17:22:21 | 10i32 | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:23:9:23:9 | x | | file://:0:0:0:0 | *mut | -| raw_pointer.rs:23:13:23:22 | &raw mut a | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:23:9:23:9 | x | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:23:13:23:22 | &raw mut a | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:23:22:23:22 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:24:5:26:5 | { ... } | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:25:19:25:19 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:25:19:25:19 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:29:18:29:21 | cond | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:29:30:40:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:30:9:30:9 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:30:13:30:17 | 10i32 | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:32:9:32:19 | ptr_written | | file://:0:0:0:0 | *mut | -| raw_pointer.rs:32:23:32:32 | null_mut(...) | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:32:9:32:19 | ptr_written | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:32:23:32:32 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:33:5:39:5 | if cond {...} | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:33:8:33:11 | cond | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:34:9:38:9 | { ... } | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:36:14:36:24 | ptr_written | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:36:14:36:24 | ptr_written | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:36:28:36:28 | a | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:37:23:37:33 | ptr_written | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:37:23:37:33 | ptr_written | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:42:24:42:27 | cond | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:42:36:51:1 | { ... } | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:44:9:44:16 | ptr_read | | file://:0:0:0:0 | *mut | -| raw_pointer.rs:44:20:44:29 | null_mut(...) | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:44:9:44:16 | ptr_read | | {EXTERNAL LOCATION} | *mut | +| raw_pointer.rs:44:20:44:29 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:45:5:50:5 | if cond {...} | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:45:8:45:11 | cond | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:46:9:49:9 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:48:17:48:18 | _y | | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:48:28:48:35 | ptr_read | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:48:28:48:35 | ptr_read | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:53:15:60:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:54:5:54:32 | raw_pointer_const_deref(...) | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:54:29:54:31 | &10 | | {EXTERNAL LOCATION} | & | @@ -8560,7 +8560,7 @@ inferType | main.rs:1803:13:1803:13 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1803:17:1803:33 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | | main.rs:1806:26:1806:30 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1806:26:1806:30 | SelfParam | TRef | file://:0:0:0:0 | *mut | +| main.rs:1806:26:1806:30 | SelfParam | TRef | {EXTERNAL LOCATION} | *mut | | main.rs:1806:26:1806:30 | SelfParam | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1806:39:1808:13 | { ... } | | {EXTERNAL LOCATION} | & | | main.rs:1806:39:1808:13 | { ... } | TRef | main.rs:1805:14:1805:23 | T | @@ -8569,16 +8569,16 @@ inferType | main.rs:1807:26:1807:32 | &... | | {EXTERNAL LOCATION} | & | | main.rs:1807:26:1807:32 | &... | TRef | main.rs:1805:14:1805:23 | T | | main.rs:1807:27:1807:32 | * ... | | main.rs:1805:14:1805:23 | T | -| main.rs:1807:28:1807:32 | * ... | | file://:0:0:0:0 | *mut | +| main.rs:1807:28:1807:32 | * ... | | {EXTERNAL LOCATION} | *mut | | main.rs:1807:28:1807:32 | * ... | TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1807:29:1807:32 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1807:29:1807:32 | self | TRef | file://:0:0:0:0 | *mut | +| main.rs:1807:29:1807:32 | self | TRef | {EXTERNAL LOCATION} | *mut | | main.rs:1807:29:1807:32 | self | TRef.TPtrMut | main.rs:1805:14:1805:23 | T | | main.rs:1810:31:1812:13 | { ... } | | main.rs:1805:14:1805:23 | T | | main.rs:1811:17:1811:28 | ...::default(...) | | main.rs:1805:14:1805:23 | T | | main.rs:1815:17:1815:17 | v | | {EXTERNAL LOCATION} | i32 | | main.rs:1815:21:1815:22 | 42 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1816:13:1816:13 | p | | file://:0:0:0:0 | *mut | +| main.rs:1816:13:1816:13 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1816:13:1816:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | & | | main.rs:1816:27:1816:32 | &mut v | TRef | {EXTERNAL LOCATION} | i32 | @@ -8587,7 +8587,7 @@ inferType | main.rs:1817:13:1817:13 | x | TRef | {EXTERNAL LOCATION} | i32 | | main.rs:1817:17:1817:40 | { ... } | | {EXTERNAL LOCATION} | & | | main.rs:1817:17:1817:40 | { ... } | TRef | {EXTERNAL LOCATION} | i32 | -| main.rs:1817:26:1817:26 | p | | file://:0:0:0:0 | *mut | +| main.rs:1817:26:1817:26 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1817:26:1817:26 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1817:26:1817:38 | p.my_method() | | {EXTERNAL LOCATION} | & | | main.rs:1817:26:1817:38 | p.my_method() | TRef | {EXTERNAL LOCATION} | i32 | @@ -8598,9 +8598,9 @@ inferType | main.rs:1818:26:1818:48 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | | main.rs:1818:26:1818:48 | ...::my_method(...) | TRef | {EXTERNAL LOCATION} | i32 | | main.rs:1818:46:1818:47 | &p | | {EXTERNAL LOCATION} | & | -| main.rs:1818:46:1818:47 | &p | TRef | file://:0:0:0:0 | *mut | +| main.rs:1818:46:1818:47 | &p | TRef | {EXTERNAL LOCATION} | *mut | | main.rs:1818:46:1818:47 | &p | TRef.TPtrMut | {EXTERNAL LOCATION} | i32 | -| main.rs:1818:47:1818:47 | p | | file://:0:0:0:0 | *mut | +| main.rs:1818:47:1818:47 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1818:47:1818:47 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1819:13:1819:13 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1819:17:1819:37 | ...::my_func(...) | | {EXTERNAL LOCATION} | i32 | @@ -12815,58 +12815,58 @@ inferType | pattern_matching.rs:843:5:843:32 | patterns_in_let_statements(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:844:5:844:37 | patterns_in_function_parameters(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:845:5:845:30 | patterns_in_control_flow(...) | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:3:28:3:28 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:3:28:3:28 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:3:28:3:28 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:3:50:6:1 | { ... } | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:4:9:4:10 | _y | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:4:14:4:26 | { ... } | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:4:23:4:24 | * ... | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:4:24:4:24 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:4:24:4:24 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:4:24:4:24 | x | TPtrConst | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:5:5:5:5 | 0 | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:8:26:8:26 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:8:26:8:26 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:8:26:8:26 | x | TPtrMut | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:8:47:11:1 | { ... } | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:9:9:9:10 | _y | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:9:14:9:26 | { ... } | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:9:23:9:24 | * ... | | {EXTERNAL LOCATION} | bool | -| raw_pointer.rs:9:24:9:24 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:9:24:9:24 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:9:24:9:24 | x | TPtrMut | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:10:5:10:5 | 0 | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:13:23:19:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:14:9:14:9 | a | | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:14:18:14:19 | 10 | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:14:18:14:19 | 10 | | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:15:9:15:9 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:15:9:15:9 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:15:9:15:9 | x | TPtrConst | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:15:13:15:24 | &raw const a | | file://:0:0:0:0 | *const | +| raw_pointer.rs:15:13:15:24 | &raw const a | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:15:13:15:24 | &raw const a | TPtrConst | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:15:24:15:24 | a | | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:16:5:18:5 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:17:13:17:14 | _y | | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:17:18:17:19 | * ... | | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:17:19:17:19 | x | | file://:0:0:0:0 | *const | +| raw_pointer.rs:17:19:17:19 | x | | {EXTERNAL LOCATION} | *const | | raw_pointer.rs:17:19:17:19 | x | TPtrConst | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:21:21:27:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:22:13:22:13 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:22:17:22:21 | 10i32 | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:23:9:23:9 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:23:9:23:9 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:23:9:23:9 | x | TPtrMut | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:23:13:23:22 | &raw mut a | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:23:13:23:22 | &raw mut a | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:23:13:23:22 | &raw mut a | TPtrMut | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:23:22:23:22 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:24:5:26:5 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:25:13:25:14 | _y | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:25:18:25:19 | * ... | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:25:19:25:19 | x | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:25:19:25:19 | x | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:25:19:25:19 | x | TPtrMut | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:29:18:29:21 | cond | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:29:30:40:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:30:9:30:9 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:30:13:30:17 | 10i32 | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:32:9:32:19 | ptr_written | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:32:9:32:19 | ptr_written | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:32:9:32:19 | ptr_written | TPtrMut | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:32:23:32:32 | null_mut(...) | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:32:23:32:32 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:32:23:32:32 | null_mut(...) | TPtrMut | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:33:5:39:5 | if cond {...} | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:33:8:33:11 | cond | | {EXTERNAL LOCATION} | bool | @@ -12874,18 +12874,18 @@ inferType | raw_pointer.rs:34:9:38:9 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:36:13:36:24 | * ... | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:36:13:36:28 | ... = ... | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:36:14:36:24 | ptr_written | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:36:14:36:24 | ptr_written | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:36:14:36:24 | ptr_written | TPtrMut | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:36:28:36:28 | a | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:37:17:37:18 | _y | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:37:22:37:33 | * ... | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:37:23:37:33 | ptr_written | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:37:23:37:33 | ptr_written | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:37:23:37:33 | ptr_written | TPtrMut | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:42:24:42:27 | cond | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:42:36:51:1 | { ... } | | {EXTERNAL LOCATION} | () | -| raw_pointer.rs:44:9:44:16 | ptr_read | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:44:9:44:16 | ptr_read | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:44:9:44:16 | ptr_read | TPtrMut | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:44:20:44:29 | null_mut(...) | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:44:20:44:29 | null_mut(...) | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:44:20:44:29 | null_mut(...) | TPtrMut | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:45:5:50:5 | if cond {...} | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:45:8:45:11 | cond | | {EXTERNAL LOCATION} | bool | @@ -12893,7 +12893,7 @@ inferType | raw_pointer.rs:46:9:49:9 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:48:17:48:18 | _y | | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:48:27:48:35 | * ... | | {EXTERNAL LOCATION} | i64 | -| raw_pointer.rs:48:28:48:35 | ptr_read | | file://:0:0:0:0 | *mut | +| raw_pointer.rs:48:28:48:35 | ptr_read | | {EXTERNAL LOCATION} | *mut | | raw_pointer.rs:48:28:48:35 | ptr_read | TPtrMut | {EXTERNAL LOCATION} | i64 | | raw_pointer.rs:53:15:60:1 | { ... } | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:54:5:54:32 | raw_pointer_const_deref(...) | | {EXTERNAL LOCATION} | i32 |