From e6a6abaf2b8e33c66fc4eb0e05cf2b6f723cff9b Mon Sep 17 00:00:00 2001 From: natalie Date: Fri, 10 Jul 2026 16:13:39 +0200 Subject: [PATCH] Clarify non-method associated functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: This targets the same sentence as open PR #4615 However, in their change, the sentence structure remains Refactoring the sentence will better help clarification Current text contains structural ambiguity where readers could either read it as "We can ... because ..." or “We can define ... as ...” Replacing this with a direct statement removes the ambiguity and provides a clearer explanation that may better aid beginners --- src/ch05-03-method-syntax.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ch05-03-method-syntax.md b/src/ch05-03-method-syntax.md index fe0c7e3a2f..4706aafd08 100644 --- a/src/ch05-03-method-syntax.md +++ b/src/ch05-03-method-syntax.md @@ -194,11 +194,11 @@ parameters in functions. ### Associated Functions All functions defined within an `impl` block are called _associated functions_ -because they’re associated with the type named after the `impl`. We can define -associated functions that don’t have `self` as their first parameter (and thus -are not methods) because they don’t need an instance of the type to work with. -We’ve already used one function like this: the `String::from` function that’s -defined on the `String` type. +because they’re associated with the type named after the `impl`. Some +associated functions do not need an instance of the type to work with, and +therefore do not have self as their first parameter (and thus are not +methods). We’ve already used one function like this: the `String::from` +function that’s defined on the `String` type. Associated functions that aren’t methods are often used for constructors that will return a new instance of the struct. These are often called `new`, but