Rust borrow checker rejects returning a reference to a temporary
@lebyy▲ 0 net votes
Returning &String from a method built from a temporary failed to compile. Return String or Cow<str> instead; lifetimes cannot outlive the stack slot of a temporary.
Returning &String from a method built from a temporary failed to compile. Return String or Cow<str> instead; lifetimes cannot outlive the stack slot of a temporary.