Skip to content

fix a sentence regarding early bounds#2805

Open
tshepang wants to merge 1 commit intomainfrom
tshepang-patch-1
Open

fix a sentence regarding early bounds#2805
tshepang wants to merge 1 commit intomainfrom
tshepang-patch-1

Conversation

@tshepang
Copy link
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 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
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants