Skip to main content

Module uneval

Module uneval 

Source
Expand description

Translate constants to the frontend: type-system constants, and the values read by rustc_const_uneval.

Re-exportsยง

use annotate_snippets::Level; ๐Ÿ”’
use rustc_const_uneval::AllocTarget; ๐Ÿ”’
use rustc_const_uneval::Byte; ๐Ÿ”’
use rustc_const_uneval::ConstReader; ๐Ÿ”’
use rustc_const_uneval::PtrTarget; ๐Ÿ”’
use rustc_const_uneval::ReadError; ๐Ÿ”’
use rustc_middle::ty; ๐Ÿ”’
use super::*; ๐Ÿ”’

Functionsยง

bits_and_type_to_float_constant_literal ๐Ÿ”’
Converts a bit-representation of a float of type ty to a constant literal
const_reader ๐Ÿ”’
The reader for constants evaluated in the current context.
read_const
Evaluate src and read it back as a ConstantExpr.
scalar_int_to_constant_literal ๐Ÿ”’
unsizing_metadata ๐Ÿ”’
The metadata of a pointer to a value of type from unsized to type to.