Search code examples
rustclionintellij-rust

Basic Rust code compiles and runs but CLion gives move error


The following function:

fn double(n: u32) -> u32 {
    n + n
}

gives the following error:

"Use of moved value"

while it compiles and runs just fine with no warnings.

I'm using the latest release of both CLion and the IntelliJ-Rust plugin along with the latest rustc nightly (clippy etc all updated too).


Solution

  • This is a currently unresolved issue in the IntelliJ-Rust plugin.

    See the related issue here.

    I'll be switching to vscode using rls.