Skip to content

E0515 searching internet for the phrase "owned value" does not give helpful results #62071

Description

@KyleSiefring

https://doc.rust-lang.org/error-index.html#E0515

Consider returning an owned value instead:

Searching for this phrase does not define it within the first page of a google search.

Activity

  1. KyleSiefring commented on Jun 23, 2019

    @KyleSiefring
    Author

    Is the example (using iter vs into_iter) referring to some sort of design pattern?

  2. Centril commented on Jun 23, 2019

    @Centril
    Contributor

    Did you search for "owned value" or "rust owned value"?

  3. KyleSiefring commented on Jun 23, 2019

    @KyleSiefring
    Author

    rust owned value

  4. ExpHP commented on Jun 23, 2019

    @ExpHP
    Contributor

    For the record, when it says "owned value," it means something that does not borrow from anything else.

    A precise technical term would be: "something with the 'static lifetime." This would certainly be more searchable, but I'm not certain that the search results that you get for it would be very helpful to the kind of user that is likely to run into this error!

    Edit: In fact, the top Google search result is very misleading! https://doc.rust-lang.org/stable/rust-by-example/scope/lifetime/static_lifetime.html . It seems to suggest that only static items and promoted consts have the 'static lifetime, which is simply not true. (it's just that they're the only things that admit a &'static borrow)

  5. jonas-schievink commented on Jun 23, 2019

    @jonas-schievink
    Contributor

    FWIW the book goes into quite a lot of detail here: https://doc.rust-lang.org/book/ch04-00-understanding-ownership.html

  6. added
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Jun 23, 2019
  7. gilescope commented on Sep 19, 2019

    @gilescope
    Contributor

    +1, Link 'owned value' to the book?

  8. ChiefMilesEdgeworth commented on Apr 18, 2020

    @ChiefMilesEdgeworth
    Contributor

    Maybe use this link, and instead of saying "owned value", say "non-reference"?

  9. added a commit that references this issue on Mar 17, 2025
    01062ba
  10. added 2 commits that reference this issue on Mar 18, 2025
    bb15724
    b3562d6
  11. added a commit that references this issue on Mar 18, 2025
    a780015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions