FractalFir / rustc_codegen_clr

This rust compiler backend(module) emmits valid CIL (.NET IR), enabling you to use Rust in .NET projects.
MIT License
1.56k stars 35 forks source link

[MISCOMPILATION] file not found for module `utilis` in cilly #48

Closed bingxinliu closed 4 months ago

bingxinliu commented 4 months ago

Describe the bug cilly does not have utilis crate. When compiling the package, rustc says:

error[E0583]: file not found for module `utilis`
  --> cilly/src/lib.rs:29:1
   |
29 | pub mod utilis;
   | ^^^^^^^^^^^^^^^
   |
   = help: to create the module `utilis`, create file "cilly/src/utilis.rs" or "cilly/src/utilis/mod.rs"
   = note: if there is a `mod utilis` elsewhere in the crate already, import it with `use crate::...` instead

Example of miscompiled code In rustc_codegen_clr/cilly/src/lib.rs:29 :

...
pub mod static_field_desc;
pub mod type_def;
pub mod utilis;
#[must_use]
...

Expected behavior Compiling should passed without any problem following the guide.

Info about your system (please complete the following information):

Additional context None

Skgland commented 4 months ago

Sounds more like a bug rather than a miscompilation if cilly declares a module but is missing the corresponding file with the module contents.

The latest commit (03a2bd3) appears to have added the module declaration but not a corresponding module file.

FractalFir commented 4 months ago

This should be fixed now.