Skip to content

Clarify that the lifetime elision rules are for the *compiler* rather than the *programmer* #411

@carols10cents

Description

@carols10cents

Feedback from IRC:

11:16 PM <snorge> the following bit with 3 rules about lifetimes needs a bit of rework as well, seems pretty opaque to me so far after re-reading it 4 or 5 times
11:17 PM <carols10cents> what about it is opaque?
11:18 PM <snorge> ok, if it's a rule, we need to follow it: "each function parameter that is a reference...gets its own"
11:19 PM <snorge> but the example above has a parameter that is a reference, without a lifetime noted
11:19 PM <carols10cents> oh okay, so these aren't rules that you the programmer need to follow:
11:19 PM <carols10cents> they're the rules that the compiler uses to figure out which lifetimes can be left out
11:20 PM <carols10cents> that could be clearer
11:20 PM <snorge> okay, that helps me understand it better

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions