Module rustc::ty::layout[][src]

🔬 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?

Re-exports

use session;
use session::DataTypeKind;
use ty;
use ty::Ty;
use ty::TyCtxt;
use ty::TypeFoldable;
use ty::ReprOptions;
use syntax::ast;
use syntax::ast::IntTy;
use syntax::ast::UintTy;
use syntax::attr;
use syntax_pos::DUMMY_SP;
use std::cmp;
use std::fmt;
use std::i128;
use std::iter;
use std::mem;
use ich::StableHashingContext;
use rustc_data_structures::stable_hasher::HashStable;
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_data_structures::stable_hasher::StableHasherResult;

Modules

call [
Experimental
]

Structs

Align [
Experimental
]

Alignment of a type in bytes, both ABI-mandated and preferred. Each field is a power of two, giving the alignment a maximum value of 2(28 - 1), which is limited by LLVM to a maximum capacity of 229 or 536870912.

LayoutCx [
Experimental
]
LayoutDetails [
Experimental
]
Niche [
Experimental
]
Scalar [
Experimental
]

Information about one scalar component of a Rust type.

Size [
Experimental
]

Size of a type in bytes.

TargetDataLayout [
Experimental
]

Parsed Data layout for a target, which contains everything needed to compute layouts.

TyLayout [
Experimental
]

The details of the layout of a type, alongside the type itself. Provides various type traversal APIs (e.g. recursing into fields).

Enums

Abi [
Experimental
]

Describes how values of the type are passed by target ABIs, in terms of categories of C types there are ABI rules for.

Endian [
Experimental
]

Endianness of the target, which must match cfg(target-endian).

FieldPlacement [
Experimental
]

Describes how the fields of a type are located in memory.

FloatTy [
Experimental
]
Integer [
Experimental
]

Integers, also used for enum discriminants.

LayoutError [
Experimental
]
Primitive [
Experimental
]

Fundamental unit of memory access and layout.

SizeSkeleton [
Experimental
]

Type size "skeleton", i.e. the only information determining a type's size. While this is conservative, (aside from constant sizes, only pointers, newtypes thereof and null pointer optimized enums are allowed), it is enough to statically check common usecases of transmute.

Variants [
Experimental
]

Constants

FAT_PTR_ADDR [
Experimental
]

The first half of a fat pointer.

FAT_PTR_EXTRA [
Experimental
]

The second half of a fat pointer.

Traits

HasDataLayout [
Experimental
]
HasTyCtxt [
Experimental
]
IntegerExt [
Experimental
]
LayoutOf [
Experimental
]
MaybeResult [
Experimental
]
PrimitiveExt [
Experimental
]
TyLayoutMethods [
Experimental
]

Functions

layout_raw [
Experimental
]
provide [
Experimental
]

Type Definitions

TyLayout [
Experimental
]