Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 3
    It is no longer necessary to include the lifetime annotations either as rustc can imply their existence for this example. Commented May 31, 2022 at 4:46
  • 2
    Be careful though, omitting the lifetime does mean something different than providing them explicitly. Here Box<dyn Foo> is inferred to be Box<dyn Foo + 'static>. Commented Aug 30, 2023 at 3:26
  • thanks, I didn't realize that. I will revert it for now Commented Aug 30, 2023 at 5:05
  • Do you think you could edit the existing answer instead with this updated information? Commented Jan 22, 2024 at 7:41