Skip to content

Conversation

@gsokoll
Copy link

@gsokoll gsokoll commented Jan 6, 2026

Add explicit '_ lifetime annotations to return types where &self implies a lifetime but the return type uses elision to hide it. This addresses the mismatched_lifetime_syntaxes lint enabled by default in recent Rust versions.

Fixes 16 warnings across 11 files:

  • RclPrimitive::handle() trait and all implementations
  • Various lock() methods returning MutexGuard
  • NodeState::use_undeclared_parameters() returning Parameters
  • LogParams::get_logger_name() returning &LoggerName

Closes #558

Add explicit '_ lifetime annotations to return types where &self implies
a lifetime but the return type uses elision to hide it. This addresses
the mismatched_lifetime_syntaxes lint enabled by default in recent Rust
versions.

Fixes 16 warnings across 11 files:
- RclPrimitive::handle() trait and all implementations
- Various lock() methods returning MutexGuard
- NodeState::use_undeclared_parameters() returning Parameters
- LogParams::get_logger_name() returning &LoggerName

Closes ros2-rust#558
@gsokoll
Copy link
Author

gsokoll commented Jan 6, 2026

Rust Stable CI succeeds. Minimal and Windows CI failures seem to be due to other known issues:
#562
#449 (closed, but new regression ?)

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.

Add explicit lifetimes to fix mismatched_lifetime_syntaxes warnings

1 participant