From 9971936036dd67cc633e05cc0da767867a8aa773 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Mon, 3 Nov 2025 10:21:19 +0100 Subject: [PATCH] Rust: Improvements to docs from review comments --- .../internal/typeinference/FunctionType.qll | 30 +++++++++---------- .../typeinference/internal/TypeInference.qll | 4 +-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll b/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll index 35ba7562658..53420cc7be6 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll @@ -124,34 +124,34 @@ Type getAssocFunctionTypeAt(Function f, ImplOrTraitItemNode i, FunctionPosition * * ```rust * trait T1 { - * fn m1(self); // self1 + * fn m1(self); // T1::m1 * - * fn m2(self) { ... } // self2 + * fn m2(self) { ... } // T1::m2 * } * * trait T2 : T1 { - * fn m3(self); // self3 + * fn m3(self); // T2::m3 * } * * impl T1 for X { - * fn m1(self) { ... } // self4 + * fn m1(self) { ... } // X::m1 * } * * impl T2 for X { - * fn m3(self) { ... } // self5 + * fn m3(self) { ... } // X::m3 * } * ``` * - * f | `impl` or trait | pos | type - * ---- | --------------- | ------ | ---- - * `m1` | `trait T1` | `self` | `T1` - * `m1` | `trait T2` | `self` | `T2` - * `m2` | `trait T1` | `self` | `T1` - * `m2` | `trait T2` | `self` | `T2` - * `m2` | `impl T1 for X` | `self` | `X` - * `m3` | `trait T2` | `self` | `T2` - * `m4` | `impl T2 for X` | `self` | `X` - * `m5` | `impl T2 for X` | `self` | `X` + * f | `impl` or trait | pos | type + * -------- | --------------- | ------ | ---- + * `T1::m1` | `trait T1` | `self` | `T1` + * `T1::m1` | `trait T2` | `self` | `T2` + * `T1::m2` | `trait T1` | `self` | `T1` + * `T1::m2` | `trait T2` | `self` | `T2` + * `T1::m2` | `impl T1 for X` | `self` | `X` + * `T2::m3` | `trait T2` | `self` | `T2` + * `X::m1` | `impl T1 for X` | `self` | `X` + * `X::m3` | `impl T2 for X` | `self` | `X` */ class AssocFunctionType extends MkAssocFunctionType { /** diff --git a/shared/typeinference/codeql/typeinference/internal/TypeInference.qll b/shared/typeinference/codeql/typeinference/internal/TypeInference.qll index 260f78344ed..9b9d60abb67 100644 --- a/shared/typeinference/codeql/typeinference/internal/TypeInference.qll +++ b/shared/typeinference/codeql/typeinference/internal/TypeInference.qll @@ -449,8 +449,8 @@ module Make1 Input1> { * - `abs` is a type abstraction that introduces type variables that are * free in `condition` and `constraint`, * - and for every instantiation of the type parameters from `abs` the - * resulting `condition` satisifies the constraint given by `constraint`. - * - `transitive` corresponds to wether any further constraints satisifed + * resulting `condition` satisfies the constraint given by `constraint`. + * - `transitive` corresponds to whether any further constraints satisfied * through `constraint` also applies to `condition`. * * Example in C#: