You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler will determine which of the closure traits the closure's type will implement by how it acts on its captured variables. The closure will also implement Send and/or Sync if all of its captured types do. These traits allow functions to accept closures using generics, even though the exact types can't be named.
The first appearance of "closure traits" is a link to 10.1.12. I am confused whether the phase "these traits" refers to:
The closure traits defined in 10.1.12
The traits Send and Sync, defined in the previous sentence.
The informal English construction meaning "these characteristics…"
"Expected behavior": You should replace "These traits" with some more specific wording. My proposed alternate text for the paragraph would be (based on my current best guess at the meaning):
The compiler will determine which of the closure traits the closure's type will implement by how it acts on its captured variables. The closure will also implement the closure traits Send and/or Sync if all of its captured types do. Closure traits allow functions to accept closures using generics, even though the exact types can't be named.
I can create a PR for this change if someone can confirm that this is actually an accurate capture of the original paragraph's intent.
The text was updated successfully, but these errors were encountered:
I am reading the Rust reference to help me learn Rust.
I am looking at 8.2.13 "closure expressions" and I do not understand this sentence (bolded):
The first appearance of "closure traits" is a link to 10.1.12. I am confused whether the phase "these traits" refers to:
"Expected behavior": You should replace "These traits" with some more specific wording. My proposed alternate text for the paragraph would be (based on my current best guess at the meaning):
I can create a PR for this change if someone can confirm that this is actually an accurate capture of the original paragraph's intent.
The text was updated successfully, but these errors were encountered: