minirust
minirust copied to clipboard
A precise specification for "Rust lite / MIR plus"
We can reduce the number of primitive operations we have to support by removing bitwise and/or/xor on bool. They can instead be implemented by casting to integer, doing the operation...
part of #172 Add `panic` as intrinsic and `assert` as Terminator. For now just added strings `"exited"` or `"panicked"` to `MachineStop` to differentiate between the two.
Rust has named types, MiniRust does not. So given an enum declaration like this... ```rust fn test_big_enum() { macro_rules! fooN { ($cur:ident $prev:ty) => { #[allow(dead_code)] enum $cur { Empty,...
Currently the following code cannot be translated ```rust fn main() { let _ = Box::new(42); } ``` Currently we can reach **3** different error states (due to nondeterminism in translation)...
Currently we cannot translate the following code: ```rust fn main() { ub_checks!(false); let _ = std::mem::size_of::(); let _ = std::mem::align_of::(); let _ = std::mem::offset_of!(F, field); } ``` This is due...
There is probably simpler code to create an `Aggregate(Ptr(Raw))` but here is how I ended up with one: ```rust #![feature(strict_provenance)] fn main() { let x_ptr = &0 as *const i32;...
For the following code, ```rust fn main() { let b = &mut 42 as *mut i32; let _ = b as *const i32; } ``` We get the following error...
If we try to coerce to an unsafe pointer ```rust fn f() {} fn main() { let g = f as unsafe fn(); } ``` We get the following error:...
Allow for using [constant `FnPtr`](https://github.com/minirust/minirust/blob/648add89ba6c2b1f030fdcb6e1e28dc5d8a43436/tooling/minimize/src/constant.rs#L40), the following fails: ```rust fn main() { let f: fn(()) -> Option = Some::; f(()); } ``` and outputs the following error message: ``` thread...
Currently a function cannot be used except for calling it ```rust fn f() {} fn main() { let _ = f; } ``` generates the following error message: ``` error:...