Skip to content

Error suggestions for import contain erroneous derive #44210

Closed

Description

@nrc

E.g.,

error[E0412]: cannot find type `Path` in this scope
  --> src/actions/compiler_message_parsing.rs:77:55
   |
77 | fn make_suggestions(message: &CompilerMessage, file: &Path) -> Vec<Suggestion> {
   |                                                       ^^^^ not found in this scope
   |
help: possible candidates are found in other modules, you can import them into scope
   |
20 | #[derive(use build::rustc::rustc::hir::Path;
   |
20 | #[derive(use build::rustc::syntax::ast::Path;
   |
20 | #[derive(use std::path::Path;

cc @oli-obk

Activity

  1. added
    A-diagnosticsArea: Messages for errors, warnings, and lints
    on Aug 31, 2017
  2. nrc commented on Aug 31, 2017

    @nrc
    MemberAuthor

    The first non-comment, non-use line in the file is #[derive(Debug)], which might be where this is coming from?

  3. oli-obk commented on Aug 31, 2017

    @oli-obk
    Contributor

    No, the first item is inside the expansion. We need a macro check. I don't think Rust's lints have any, but clippy has a convenience function in almost every lint. We should probably upstream it. There are so many diagnostics that choke on expansions.

  4. added
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Sep 1, 2017
  5. nikomatsakis commented on Sep 14, 2017

    @nikomatsakis
    Contributor

    Closing as duplicate of #44566.

  6. added a commit that references this issue on Sep 21, 2017
    17f56c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions