Rust: Improvements to docs from review comments

This commit is contained in:
Simon Friis Vindum
2025-11-03 10:21:19 +01:00
parent a07f015d01
commit 9971936036
2 changed files with 17 additions and 17 deletions

View File

@@ -124,34 +124,34 @@ Type getAssocFunctionTypeAt(Function f, ImplOrTraitItemNode i, FunctionPosition
* *
* ```rust * ```rust
* trait T1 { * trait T1 {
* fn m1(self); // self1 * fn m1(self); // T1::m1
* *
* fn m2(self) { ... } // self2 * fn m2(self) { ... } // T1::m2
* } * }
* *
* trait T2 : T1 { * trait T2 : T1 {
* fn m3(self); // self3 * fn m3(self); // T2::m3
* } * }
* *
* impl T1 for X { * impl T1 for X {
* fn m1(self) { ... } // self4 * fn m1(self) { ... } // X::m1
* } * }
* *
* impl T2 for X { * impl T2 for X {
* fn m3(self) { ... } // self5 * fn m3(self) { ... } // X::m3
* } * }
* ``` * ```
* *
* f | `impl` or trait | pos | type * f | `impl` or trait | pos | type
* ---- | --------------- | ------ | ---- * -------- | --------------- | ------ | ----
* `m1` | `trait T1` | `self` | `T1` * `T1::m1` | `trait T1` | `self` | `T1`
* `m1` | `trait T2` | `self` | `T2` * `T1::m1` | `trait T2` | `self` | `T2`
* `m2` | `trait T1` | `self` | `T1` * `T1::m2` | `trait T1` | `self` | `T1`
* `m2` | `trait T2` | `self` | `T2` * `T1::m2` | `trait T2` | `self` | `T2`
* `m2` | `impl T1 for X` | `self` | `X` * `T1::m2` | `impl T1 for X` | `self` | `X`
* `m3` | `trait T2` | `self` | `T2` * `T2::m3` | `trait T2` | `self` | `T2`
* `m4` | `impl T2 for X` | `self` | `X` * `X::m1` | `impl T1 for X` | `self` | `X`
* `m5` | `impl T2 for X` | `self` | `X` * `X::m3` | `impl T2 for X` | `self` | `X`
*/ */
class AssocFunctionType extends MkAssocFunctionType { class AssocFunctionType extends MkAssocFunctionType {
/** /**

View File

@@ -449,8 +449,8 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
* - `abs` is a type abstraction that introduces type variables that are * - `abs` is a type abstraction that introduces type variables that are
* free in `condition` and `constraint`, * free in `condition` and `constraint`,
* - and for every instantiation of the type parameters from `abs` the * - and for every instantiation of the type parameters from `abs` the
* resulting `condition` satisifies the constraint given by `constraint`. * resulting `condition` satisfies the constraint given by `constraint`.
* - `transitive` corresponds to wether any further constraints satisifed * - `transitive` corresponds to whether any further constraints satisfied
* through `constraint` also applies to `condition`. * through `constraint` also applies to `condition`.
* *
* Example in C#: * Example in C#: