Enum rustc_expand::hygiene::Transparency[][src]

pub enum Transparency {
    Transparent,
    SemiTransparent,
    Opaque,
}
Expand description

A property of a macro expansion that determines how identifiers produced by that expansion are resolved.

Variants

Transparent

Identifier produced by a transparent expansion is always resolved at call-site. Call-site spans in procedural macros, hygiene opt-out in macro should use this.

SemiTransparent

Identifier produced by a semi-transparent expansion may be resolved either at call-site or at definition-site. If it’s a local variable, label or $crate then it’s resolved at def-site. Otherwise it’s resolved at call-site. macro_rules macros behave like this, built-in macros currently behave like this too, but that’s an implementation detail.

Opaque

Identifier produced by an opaque expansion is always resolved at definition-site. Def-site spans in procedural macros, identifiers from macro by default use this.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 1 byte

Size for each variant: