Skip to content

Compiler import suggestions are not useful #445

Open
@jethrogb

Description

@jethrogb

The combination of the large amount of crates loaded by default on the playground and Rust 2018 no longer requiring extern crate has created a usability problem.

Consider the following code:

fn main() {
    let _: Error;
}

This will result in this compile error:

error[E0412]: cannot find type `Error` in this scope
 --> src/main.rs:2:12
  |
2 |     let _: Error;
  |            ^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
  |
1 | use cc::Error;
  |
1 | use clap::Error;
  |
1 | use core::fmt::Error;
  |
1 | use csv::Error;
  |
and 53 other candidates

Previously, it would've only shown suggestions from std, which is probably what I wanted. I don't know how this could be reasonably fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedNot immediately going to be prioritized — ask for mentoring instructions!maintenanceKeeping the wheels turning

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions