File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
docs/reference/src/components/cairo/modules/language_constructs/pages Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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
1315Methods can be defined only in traits and impls.
1416The 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
4443When a method is called, the compiler will search for a trait containing a function with a matching
4544name in the current scope.
You can’t perform that action at this time.
0 commit comments