Skip to content

i32 doesn't implement Display (required by {}) #5948

@MichalMichalak

Description

@MichalMichalak

Environment

  • IntelliJ Rust plugin version: 0.3.128.3278-202
  • Rust toolchain version: stable-x86_64-apple-darwin (default) / rustc 1.45.2 (d3fb005a3 2020-07-31)
  • IDE name and version: IntelliJ IDEA 2020.2 (Community Edition) / Build #IC-202.6397.94, built on July 27, 2020
  • Operating system: MacOS 10.15.6

Problem description

Example compiles and runs fine but IDE shows error:

`i32` doesn't implement `Display` (required by {})

Steps to reproduce

fn show_one() {
    let i: i32 = 1;
    println!("{}", i);
}

In line 3, i is underlined with red marker and above mentioned message appears on mouse hover.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions