thepowersgang/mrustc

Compilation Error: Failed to find IntoIterator implementation for `core-0_0_0`

Closed this issue · 2 comments

I encountered an error while compiling a Rust program using mrustc. The code and error message is as follows

Code

fn main() {
    let arr = [0; 10];
    for i in arr {
        println!("{}", i)
    }
}

Error Output

:0:0 error:0:Failed to find an impl of ::"core-0_0_0"::iter::traits::IntoIterator for [_/*36:i*/; 10]
Aborted (core dumped)

However, the code can be compiled successfilly by rustc(stable 1.72).

mrustc only supports up to rust 1.54.0, and then only when explicitly asked to build it. The default is (for legacy reasons) 1.29

Look at the build-1.54.0.sh script for the commands to build for a more recent version.

Thank you for your reply😃. I find the code failed to be compiled by rustc-1.29🤣