Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): kill crate_type in HaxMeta #756

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions cli/driver/src/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,9 @@ impl Callbacks for ExtractionCallbacks {

let cg_metadata = opts.cg.metadata[0].clone();
let crate_name = opts.crate_name.clone().unwrap();
let crate_type = match &opts.crate_types[..] {
[crate_type] => format!("{}", crate_type),
_ => panic!(),
};

let output_dir = compiler.sess.io.output_dir.clone().unwrap();
let haxmeta_path =
output_dir.join(format!("{crate_type}{crate_name}-{cg_metadata}.haxmeta",));
let haxmeta_path = output_dir.join(format!("{crate_name}-{cg_metadata}.haxmeta",));

let mut file = BufWriter::new(File::create(&haxmeta_path).unwrap());

Expand All @@ -271,7 +266,6 @@ impl Callbacks for ExtractionCallbacks {
convert_thir(&self.clone().into(), self.macro_calls.clone(), tcx);
let haxmeta: HaxMeta<Body> = HaxMeta {
crate_name,
crate_type,
cg_metadata,
externs,
impl_infos,
Expand Down
1 change: 0 additions & 1 deletion hax-types/src/driver_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub enum HaxDriverMessage {
#[derive(Debug, Clone)]
pub struct HaxMeta<Body: hax_frontend_exporter::IsBody> {
pub crate_name: String,
pub crate_type: String,
pub cg_metadata: String,
pub externs: Vec<PathBuf>,
pub items: Vec<hax_frontend_exporter::Item<Body>>,
Expand Down
Loading