Skip to content

Conversation

@jschwe
Copy link
Member

@jschwe jschwe commented Nov 12, 2025

Fixes #652

Not sure if this fixes all instances, since there are still many bindgen related warnings polluting the output, where I can't seem to find the option that can silence them.

T: GCMethods + Copy,
{
pub fn handle(&self) -> Handle<T> {
pub fn handle(&self) -> Handle<'_, T> {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't all lifetimes be explicit by lint?

Suggested change
pub fn handle(&self) -> Handle<'_, T> {
pub fn handle(&'_ self) -> Handle<'_, T> {

Copy link
Member

@sagudev sagudev left a comment

Choose a reason for hiding this comment

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

LGTM, although I prefer explicit lifetimes (even if '_). everywhere.

Signed-off-by: Jonathan Schwender <[email protected]>
}

pub fn handle_mut(&mut self) -> MutableHandle<T> {
pub fn handle_mut(&'a mut self) -> MutableHandle<'a, T> {
Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, this seems to cause borrow-checker errors. The lifetime 'ashould be correct, given that handle() also uses it?
I don't have time to look deeper into this today though.

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.

Fix mismatched_lifetime_syntaxes warning

2 participants