Skip to content

Commit cea2157

Browse files
authored
docs: move methods-and-self xref to method-calls overview (#9781)
1 parent 0d881fd commit cea2157

File tree

1 file changed

+2
-3
lines changed
  • docs/reference/src/components/cairo/modules/language_constructs/pages

1 file changed

+2
-3
lines changed

docs/reference/src/components/cairo/modules/language_constructs/pages/method-calls.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ The differences between the two are:
99
a reference `ref expr`, depending on the method's signature.
1010
See xref:../../language_semantics/pages/linear-types.adoc[Linear types] for more details.
1111
12+
For how methods are declared with `self`, see xref:functions.adoc#_methods_and_self[Methods and self].
13+
1214
== `self` and methods
1315
Methods can be defined only in traits and impls.
1416
The self parameter in Cairo trait and impl functions represents a value of a specified type,
@@ -37,9 +39,6 @@ fn bar<T: impl TDisplay: Display<T>>(value: T) {
3739
}
3840
----
3941

40-
For more details on declaring methods and the supported forms of `self`, see
41-
xref:functions.adoc#_methods_and_self[Methods and self].
42-
4342
== Search locations for methods
4443
When a method is called, the compiler will search for a trait containing a function with a matching
4544
name in the current scope.

0 commit comments

Comments
 (0)