Hi. Many people here will be glad to help you, but we can't do much with the information you provided us. Please try providing a minimal reproducible example (sharing it on Rust playground would be best). Without knowing what the types are - what is R<()> for example? - it is impossible to determine what is the root cause of your problem. Also error message should point faulty expression (and provide a hint to where this temporary is created), but you removed it. Reading your example now I don't see any return paths, that return borrowed data.