[][src]Module syntax::ast

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Re-exports

pub use GenericArgs::*;
pub use UnsafeSource::*;
pub use crate::util::parser::ExprPrecedence;

Modules

node_id_innerInternal

Structs

AngleBracketedArgsInternal

A path like Foo<'a, T>.

AnonConstInternal

A constant (expression) that's not an item or associated item, but needs its own DefId for type-checking, const-eval, etc. These are usually found nested inside types (e.g., array lengths) or expressions (e.g., repeat counts), and also used to define explicit discriminant values for enum variants.

ArmInternal

An arm of a 'match'.

AssocTyConstraintInternal

A constraint on an associated type (e.g., A = Bar in Foo<A = Bar> or A: TraitA + TraitB in Foo<A: TraitA + TraitB>).

AttrIdInternal
AttrItemInternal
AttributeInternal

Metadata associated with an item. Doc-comments are promoted to attributes that have is_sugared_doc = true.

BareFnTyInternal
BlockInternal

A block ({ .. }).

CrateInternal
EnumDefInternal
ExprInternal

An expression.

FieldInternal
FieldPatInternal

A single field in a struct pattern

FnDeclInternal

A header (not the body) of a function declaration.

FnHeaderInternal

A function header.

ForeignItemInternal
ForeignModInternal

Foreign module declaration.

GenericParamInternal
GenericsInternal

Represents lifetime, type and const parameters attached to a declaration of a function, enum, trait, etc.

GlobalAsmInternal

Global inline assembly.

IdentInternal
ImplItemInternal

Represents anything within an impl block.

InlineAsmInternal

Inline assembly.

InlineAsmOutputInternal

Inline assembly.

ItemInternal

An item.

LabelInternal
LifetimeInternal
LitInternal

An AST literal.

LocalInternal

Local represents a let statement, e.g., let <pat>:<ty> = <expr>;.

MacInternal

Represents a macro invocation. The Path indicates which macro is being invoked, and the vector of token-trees contains the source of the macro invocation.

MacroDefInternal
MetaItemInternal

A spanned compile-time attribute item.

MethodSigInternal

Represents a method's signature in a trait declaration, or in an implementation.

ModInternal

Module declaration.

MutTyInternal
NameInternal

An interned string.

NodeIdInternal
ParamInternal

A parameter in a function header.

ParenthesizedArgsInternal

A path like Foo(A, B) -> C.

PatInternal
PathInternal

A "Path" is essentially Rust's notion of a name.

PathSegmentInternal

A segment of a path: an identifier, an optional lifetime, and a set of types.

PolyTraitRefInternal
QSelfInternal

The explicit Self type in a "qualified path". The actual path, including the trait and the associated item, is stored separately. position represents the index of the associated item qualified with this Self type.

StmtInternal

A statement

StructFieldInternal

Field of a struct.

TraitItemInternal

Represents an item declaration within a trait declaration, possibly including a default implementation. A trait item is either required (meaning it doesn't have an implementation, just a signature) or provided (meaning it has a default implementation).

TraitRefInternal

TraitRefs appear in impls.

TyInternal
UseTreeInternal

A tree of paths sharing common prefixes. Used in use items both at top-level and inside of braces in import groups.

VariantInternal
WhereBoundPredicateInternal

A type bound.

WhereClauseInternal

A where-clause in a definition.

WhereEqPredicateInternal

An equality predicate (unsupported).

WhereRegionPredicateInternal

A lifetime predicate.

Enums

AsmDialectInternal

Inline assembly dialect.

AssocTyConstraintKindInternal

The kinds of an AssocTyConstraint.

AttrStyleInternal

Distinguishes between Attributes that decorate items and Attributes that are contained as statements within items. These two cases need to be distinguished for pretty-printing.

BinOpKindInternal
BindingModeInternal
BlockCheckModeInternal
CaptureByInternal

A capture clause.

ConstnessInternal
CrateSugarInternal
DefaultnessInternal
ExprKindInternal
FloatTyInternal
ForeignItemKindInternal

An item within an extern block.

FunctionRetTyInternal
GenericArgInternal
GenericArgsInternal

The arguments of a path segment.

GenericBoundInternal

The AST represents all type param bounds as types. typeck::collect::compute_bounds matches these against the "special" built-in traits (see middle::lang_items) and detects Copy, Send and Sync.

GenericParamKindInternal
ImplItemKindInternal

Represents various kinds of content within an impl.

ImplPolarityInternal
IntTyInternal
IsAsyncInternal
IsAutoInternal

Is the trait definition an auto trait?

ItemKindInternal
LitIntTypeInternal
LitKindInternal

Literal kind.

MacDelimiterInternal
MacStmtStyleInternal
MetaItemKindInternal

A compile-time attribute item.

MovabilityInternal

The movability of a generator / closure literal.

MutabilityInternal
NestedMetaItemInternal

Possible values inside of compile-time attribute lists.

ParamKindOrdInternal

Specifies the enforced ordering for generic parameters. In the future, if we wanted to relax this order, we could override PartialEq and PartialOrd, to allow the kinds to be unordered.

PatKindInternal
RangeEndInternal
RangeLimitsInternal

Limit types of a range (inclusive or exclusive)

RangeSyntaxInternal
SelfKindInternal

Alternative representation for Args describing self parameter of methods.

StmtKindInternal
StrStyleInternal
TraitBoundModifierInternal

A modifier on a bound, currently this is only used for ?Sized, where the modifier is Maybe. Negative bounds should also be handled here.

TraitItemKindInternal
TraitObjectSyntaxInternal

Syntax used to declare a trait object.

TyKindInternal

The various kinds of type recognized by the compiler.

UintTyInternal
UnOpInternal
UnsafeSourceInternal
UnsafetyInternal
UseTreeKindInternal

Part of use item to the right of its prefix.

VariantDataInternal

Fields and constructor ids of enum variants and structs.

VisibilityKindInternal
WherePredicateInternal

A single predicate in a where-clause.

Constants

CRATE_NODE_IDInternal

NodeId used to represent the root of the crate.

DUMMY_NODE_IDInternal

When parsing and doing expansions, we initially give all AST nodes this AST node value. Then later, in the renumber pass, we renumber them to have small, positive ids.

_Internal

Type Definitions

BinOpInternal
CrateConfigInternal

The set of MetaItems that define the compilation environment of the crate, used to drive conditional compilation.

ExplicitSelfInternal
GenericBoundsInternal
VisibilityInternal