Skip to content

E0619 diagnostic occurs twice in rustc source #46837

Closed

Description

@pnkfelix

PR #46664 injected a second use of E0619.

This causes a warning at compile-time for rustc_typeck:

   Compiling rustc_typeck v0.0.0 (file:///home/pnkfelix/Dev/Mozilla/rust-mirborrowck/src/librustc_typeck)
warning: diagnostic code E0619 already used
    --> /home/pnkfelix/Dev/Mozilla/rust-mirborrowck/src/librustc_typeck/check/mod.rs:4962:21
     |
4962 | /                     type_error_struct!(self.tcx.sess, sp, ty, E0619,
4963 | |                                        "the type of this value must be known in this context")
     | |______________________________________________________________________________________________^
     |
note: previous invocation
    --> /home/pnkfelix/Dev/Mozilla/rust-mirborrowck/src/librustc_typeck/check/method/probe.rs:328:25
     |
328  | /                         struct_span_warn!(self.tcx.sess, span, E0619,
329  | |                             "the type of this value must be known in this context")
     | |___________________________________________________________________________________^
     = note: this error originates in a macro outside of the current crate

Activity

  1. arielb1 commented on Dec 19, 2017

    @arielb1
    Contributor

    cc @mikeyhew - could you use a different error number for this soft warning?

  2. nodakai commented on Dec 19, 2017

    @nodakai
    Contributor

    I'm sort of surprised to see when rustc caught the duplication it only raised a warning.

    Maybe a hard error?

  3. mikeyhew commented on Dec 20, 2017

    @mikeyhew
    Contributor

    I remember getting this warning, and was going to deal with it but forgot. @arielb1 creating a separate error code would not be ideal, because it's the same error. When I change the warning to a future-compatibility lint though, I believe this will go away since it won't use an error code.

  4. arielb1 commented on Dec 20, 2017

    @arielb1
    Contributor

    Sure enough. Change it to a future-compat warning. Just don't bother everyone with a duplicate error code.

  5. mikeyhew commented on Dec 21, 2017

    @mikeyhew
    Contributor

    @arielb1 I mean, I think it's the warning that's bothering people, not the fact that it's the same error code. The point was to exactly replicate the error, but make it a warning instead. Anyway, I'll change it to a future-compat lint. I'm just going to create a placeholder tracking issue for now, without explaining the reason for the lint, so that this issue gets resolved sooner.

  6. added a commit that references this issue on Dec 25, 2017
    a6fc844
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions