Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustlifetime annotations on structsSingle-choice MCQ

Consider this impl block. Why is the second `'a` needed after `impl`?

struct Ctx<'a> { data: &'a [u8] } impl<'a> Ctx<'a> { fn bytes(&self) -> &'a [u8] { self.data } }