79715717

Date: 2025-07-26 14:04:22
Score: 2
Natty:
Report link

The lifetime of outer is the entirety of your function, while the lifetime of inner is the body of the function. Thus inner is dropped too soon. When you create a new variable fn1_outer (last example) its lifetime is inferred to be shorter than the function body.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Patrick Schlieker