Skip to main content

charon_driver/frontend/
mod.rs

1//! A frontend to rustc internals, to massage its representations and queries into a more uniform shape.
2#![allow(rustdoc::private_intra_doc_links)]
3#![allow(clippy::unneeded_struct_pattern, clippy::should_implement_trait)]
4
5mod rustc_utils;
6pub mod state;
7
8mod constant_utils;
9mod types;
10
11mod prelude;
12
13pub use prelude::*;
14
15mod sinto;
16mod traits;
17
18pub use hax_adt_into::AdtInto;
19pub use sinto::SInto;
20
21pub mod options {
22    pub use rustc_trait_elaboration::BoundsOptions;
23
24    #[derive(Debug, Default, Clone)]
25    pub struct Options {
26        /// Whether we should evaluate and inline the value of anonymous constants (inline `const {}`
27        /// blocks or advanced constant expressions as in `[T; N+1]`), or refer to them as
28        /// `GlobalName`s.
29        pub inline_anon_consts: bool,
30        /// How to read evaluated constants.
31        pub consts: rustc_const_uneval::Config,
32        /// Whether `Box<T>` is treated as a built-in pointer rather than as a struct.
33        pub treat_box_as_builtin: bool,
34    }
35}