Skip to content

Improvement in error message #37319

@flavius

Description

@flavius

Given this code:

fn main() {
    let t:u32 = 0;
    let v = vec![42];
    println!("{}", v[t]);
}

I would argue that putting the first piece of information which when fixed, leads to a fix of the problem, and spelling out the ":", would make the error message more helpful.

Instead of trait std::vec::Vec<{integer}>: std::ops::Index not satisfied it could be The trait std::ops::Indexis not implemented forstd::vec::Vec<({integer}, {integer})>``

rustc nightly rustc 1.14.0-nightly (16eeeac78 2016-10-18)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions