Enum rustc::hir::lowering::AnonymousLifetimeMode[][src]

enum AnonymousLifetimeMode {
    CreateParameter,
    PassThrough,
}
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

What to do when we encounter an anonymous lifetime reference. Anonymous lifetime references come in two flavors. You have implicit, or fully elided, references to lifetimes, like the one in &T or Ref<T>, and you have '_ lifetimes, like &'_ T or Ref<'_, T>. These often behave the same, but not always:

We describe the effects of the various modes in terms of three cases:

Currently, the handling of lifetime elision is somewhat spread out between HIR lowering and -- as described below -- the resolve_lifetime module. Often we "fallthrough" to that code by generating an "elided" or "underscore" lifetime name. In the future, we probably want to move everything into HIR lowering.

Variants

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

For Modern cases, create a new anonymous region parameter and reference that.

For Dyn Bound cases, pass responsibility to resolve_lifetime code.

For Deprecated cases, report an error.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Pass responsibility to resolve_lifetime code for all cases.

Trait Implementations

impl Copy for AnonymousLifetimeMode
[src]

impl Clone for AnonymousLifetimeMode
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for AnonymousLifetimeMode

impl Sync for AnonymousLifetimeMode