Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Rust
/
Lifetimes
When is a for-lifetime higher-ranked bound appropriate?
from Lifetimes
Rust 1.98
advanced
1 min
When is a for-lifetime higher-ranked bound appropriate?
When the callee must choose a fresh input lifetime for each callback invocation
When a local reference must be converted into a static reference
When all callback calls must share one lifetime chosen by the outer caller
When a callback should run exactly once
Check
Ask AI about this kata
Report an error
previous kata
What does fn choose<'a>(x: &'a str, y: &'a str) -> &'a str mean?
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload