Skip to main content

Module translate_ctx

Module translate_ctx 

Source
Expand description

The translation contexts.

Re-exportsΒ§

use super::translate_crate::RustcItem; πŸ”’
pub use super::translate_crate::TransItemSource;
use super::translate_generics::BindingLevel; πŸ”’
use super::translate_generics::LifetimeMutabilityComputer; πŸ”’
use crate::frontend as front; πŸ”’
use crate::frontend::SInto; πŸ”’
use charon_lib::formatter::FmtCtx; πŸ”’
use charon_lib::formatter::IntoFormatter; πŸ”’
use charon_lib::ids::IndexVec; πŸ”’
use charon_lib::options::TranslateOptions; πŸ”’
use petgraph::graphmap::DiGraphMap; πŸ”’
use rustc_hash::FxHashMap as HashMap; πŸ”’
use rustc_hash::FxHashSet as HashSet; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_span::def_id::DefId as RDefId; πŸ”’
use std::borrow::Cow; πŸ”’
use std::cell::RefCell; πŸ”’
use std::collections::VecDeque; πŸ”’
use std::fmt::Debug; πŸ”’
use std::fmt::Debug; πŸ”’
use std::ops::Deref; πŸ”’
use std::ops::DerefMut; πŸ”’
use std::path::PathBuf; πŸ”’
use std::sync::Arc; πŸ”’
use std::fmt; πŸ”’
use std::mem; πŸ”’
use charon_lib::ast::*; πŸ”’

MacrosΒ§

error_assert πŸ”’
Custom assert to either panic or return an error
raise_error πŸ”’
Macro to either panic or return on error, depending on the CLI options
register_error πŸ”’

StructsΒ§

DepSource πŸ”’
We use this to save the origin of an id. This is useful for the external dependencies, especially if some external dependencies don’t extract: we use this information to tell the user what is the code which (transitively) lead to the extraction of those problematic dependencies.
ErrorCtx πŸ”’
The context for tracking and reporting errors.
ItemTransCtx πŸ”’
A translation context for items. Augments the TranslateCtx with type-level variables.
Level πŸ”’
Severity level for [Title]s and [Message]s
TranslateCtx
Translation context used while translating the crate data into our representation.

EnumsΒ§

ContainmentNode
Nodes in the containment graph used to compute ItemMeta::started_from.
ExportedFns
The functions exported under a given symbol.
ItemOrModuleId
ItemOrModuleKind
MethodStatus
Tracks whether a method is used (i.e. called or (non-opaquely) implemented).

FunctionsΒ§

catch_sinto
Translates T into U using frontend’s SInto trait, catching any frontend panics.