Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustlifetimes and elisionSingle-choice MCQ

Given the function signature below, what is the elided lifetime relationship the compiler infers?

fn first_word<'a>(s: &str, sep: &str) -> &str { s.split(sep).next().unwrap() }