From e527fc00a94a7c50b41f1d982bc1c5389b2783c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Catarino=20Fran=C3=A7a?= Date: Thu, 24 Feb 2022 17:28:06 -0300 Subject: [PATCH] hot fix --- src/bindgen/ir/global.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bindgen/ir/global.rs b/src/bindgen/ir/global.rs index b3b5c657e..d9066af6f 100644 --- a/src/bindgen/ir/global.rs +++ b/src/bindgen/ir/global.rs @@ -4,16 +4,15 @@ use std::io::Write; -use cbindgen::Language; use syn::ext::IdentExt; -use crate::bindgen::cdecl; use crate::bindgen::config::Config; use crate::bindgen::declarationtyperesolver::DeclarationTypeResolver; use crate::bindgen::dependencies::Dependencies; use crate::bindgen::ir::{AnnotationSet, Cfg, Documentation, Item, ItemContainer, Path, Type}; use crate::bindgen::library::Library; use crate::bindgen::writer::{Source, SourceWriter}; +use crate::bindgen::{cdecl, Language}; #[derive(Debug, Clone)] pub struct Static { @@ -111,7 +110,6 @@ impl Source for Static { fn write(&self, config: &Config, out: &mut SourceWriter) { if config.language != Language::Zig { out.write("extern "); - if let Type::Ptr { is_const: true, .. } = self.ty { } else if !self.mutable { out.write("const ");