Skip to content

fix a sentence regarding early bounds#2805

Merged
tshepang merged 1 commit intomainfrom
tshepang-patch-1
Mar 28, 2026
Merged

fix a sentence regarding early bounds#2805
tshepang merged 1 commit intomainfrom
tshepang-patch-1

Conversation

@tshepang
Copy link
Copy Markdown
Member

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Mar 23, 2026
Comment thread src/early-late-parameters.md Outdated
Comment on lines +133 to +135
In this example, we call `foo`'s function item type twice, each time with a borrow of a temporary.
These two borrows could not possibly have lifetimes that overlap as the temporaries are only alive during the function call, not after.
The lifetime parameter on `foo` being early bound requires all callers of `f` to provide a borrow with the same lifetime, as this is not possible the borrow checker errors.
The lifetime parameter on `foo` being early bound requires all callers of `f` to provide a borrow with the same lifetime, else this would not be possible due borrow checker errors.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what the new sentence means 🤔 maybe the stuff here should be reflowed like so:

The lifetime parameter on foo being early bound requires all callers of f to provide a borrow with the same lifetime.
In this example, we call foo's function item type twice, each time with a borrow of a temporary.
These two borrows could not possibly have lifetimes that overlap as the temporaries are only alive during the function call, not after, so we get a compilation error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I had made it worse than before

@tshepang tshepang merged commit 91be1fb into main Mar 28, 2026
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Mar 28, 2026
@tshepang tshepang deleted the tshepang-patch-1 branch March 28, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants