diff --git a/src/csharp/Intel/Generator/InstructionInfo/Rust/RustInstrInfoGenerator.cs b/src/csharp/Intel/Generator/InstructionInfo/Rust/RustInstrInfoGenerator.cs index 9a82bf898..9970f3ee9 100644 --- a/src/csharp/Intel/Generator/InstructionInfo/Rust/RustInstrInfoGenerator.cs +++ b/src/csharp/Intel/Generator/InstructionInfo/Rust/RustInstrInfoGenerator.cs @@ -42,7 +42,7 @@ protected override void Generate((InstructionDef def, uint dword1, uint dword2)[ using (var writer = new FileWriter(TargetLanguage.Rust, FileUtils.OpenWrite(filename))) { writer.WriteFileHeader(); writer.WriteLine(RustConstants.AttributeNoRustFmt); - writer.WriteLine($"pub(crate) static TABLE: [(u32, u32); {infos.Length}] = ["); + writer.WriteLine($"pub(crate) const TABLE: [(u32, u32); {infos.Length}] = ["); using (writer.Indent()) { foreach (var info in infos) writer.WriteLine($"({NumberFormatter.FormatHexUInt32WithSep(info.dword1)}, {NumberFormatter.FormatHexUInt32WithSep(info.dword2)}),// {info.def.Code.Name(idConverter)}"); @@ -119,7 +119,7 @@ void GenerateOpAccesses(FileWriter writer) { var opInfo = opInfos[index]; writer.WriteLine(RustConstants.AttributeNoRustFmt); var name = idConverter.Constant($"OpAccess_{index}"); - writer.WriteLine($"pub(super) static {name}: [{opAccessTypeStr}; {opInfo.Values.Length}] = ["); + writer.WriteLine($"pub(super) const {name}: [{opAccessTypeStr}; {opInfo.Values.Length}] = ["); using (writer.Indent()) { foreach (var value in opInfo.Values) { var v = ToOpAccess(value); diff --git a/src/rust/iced-x86/src/info/enums.rs b/src/rust/iced-x86/src/info/enums.rs index d54d2b39c..9263f49fa 100644 --- a/src/rust/iced-x86/src/info/enums.rs +++ b/src/rust/iced-x86/src/info/enums.rs @@ -7,7 +7,7 @@ use core::fmt; // GENERATOR-BEGIN: OpAccesses // ⚠️This was generated by GENERATOR!🦹‍♂️ #[rustfmt::skip] -pub(crate) const OP_ACCESS_1: [OpAccess; 7] = [ +pub(super) const OP_ACCESS_1: [OpAccess; 7] = [ OpAccess::None, OpAccess::CondRead, OpAccess::NoMemAccess, @@ -17,7 +17,7 @@ pub(crate) const OP_ACCESS_1: [OpAccess; 7] = [ OpAccess::Write, ]; #[rustfmt::skip] -pub(crate) const OP_ACCESS_2: [OpAccess; 3] = [ +pub(super) const OP_ACCESS_2: [OpAccess; 3] = [ OpAccess::None, OpAccess::Read, OpAccess::ReadWrite,